Not necessarily:They get the citizenship of the parents.
"In some countries, children become stateless because women cannot pass on their nationality to their children. Even if the child is born in the same country as its mother, if the father has no nationality, the child has no right to citizenship in its country of birth and becomes a stateless person. Discriminatory regulations on nationality can also lead to statelessness if the father is unknown and the mother cannot pass on her nationality. Until 2013, Senegal had discriminatory legislation which prevented women from passing on their nationality to their children."
https://www.humanrights.ch/en/switz...ldren-a-status-contradicting-childrens-rights