The law varies from one country to the next, regarding citizenship at birth. Always has.
The vast bulk of the world follows Jus Sanguinus. Except for England after 1608, Europe mostly followed Roman law, which followed Greek law.