CPS or social services can take your child from you if you are homeless and actually living on the streets because that would be considered neglect to the child or children even though it's likely not your fault for being homeless.
If you're homeless and living in a shelter then no CPS should not take your kid or kids from you as long as they are being provided for.
If someone reports you to child services and you're living in your car or other vehicle or living directly on the streets then CPS can take your child or children but if they are being provided for they may try to get you help first by having you go to a shelter.
My sister worked for CPS and hated taking children away and would first try to get someone who is homeless some shelter first and have them go to a homeless shelter with their children before she would even try to take the child or children away.
But some CPS workers are not very caring at all and would want to take a child or children away as soon as possible.
If you're homeless with children try to go to a homeless shelter even though it's embarrassing and do your best to get a job if possible.
Take any job that might come your way and then try to get a travel trailer or cheap motorhome to live in which would be much better than actually living on the streets.