Because of your unmarried status, you will almost certainly need to establish paternity
first if you haven't already done so. Once paternity has been established, you would then file to obtain temporary custody as a first step. The longer the child has been in your care, the better the chances that you would be awarded temporary custody. This is an important first step, because temporary custody usually turns into permanent custody, and the most reliable indicator of whether or not temporary custody becomes permanent is how long the child has been under the temporary custody order. Again, the longer the child is in your care, the better.
If you intend to file for custody, you should retain an attorney as soon as possible and discuss this matter with him/her.
Because delay works in your favor, your attorney may want move more slowly and wait to file the motions until sufficient time has elapsed. Once the case is underway, your attorney may further elongate the case by extending the court date. This way the child will be with you in an 'established custodial environment' for as long as possible before the judge has to make any decision. After a certain amount of time (6 months to a year) it almost won't matter, the judge won't want to change the status quo no matter what.