It depends on your foster-care situation. For example, your foster parents may not want or be able to care for a child. Your group home may not be able to care for babies safely.
If you are pregnant and want to have the baby, talk to your social worker, your lawyer, and your foster parents. You can decide together whether the foster home you are in will be a good place for you to stay.
If you need a different placement, the more time your social worker has to work with, the easier it will be to find a place where you and your child can be together.