The masculine or feminine subject pronoun (she/ he) is used when gender is known; when referring to an inanimate object, the gender-neutral form “it” is used.
The subject pronoun “it” can be used to refer to animals of unspecific gender, and it is also appropriate to use the subject pronoun “it” to describe a baby of unknown gender.
so, when we don’t know if it is a (she) or a (he) we can use it.
Good luck 🌷
Ola. M