Hi, Ivan!
For animals, if we do know for sure their name and/or sex (male or female) we should use “He/She” Only use “it”if you are uncertain about the animal’s sex.
As for inanimate objects, always use “it” to refer to them.
Hope this helps you have a better idea of this!
I invite you to check out my profile, since I am a teacher here on iTalki, and together we can answer more questions like this.