It’s is a contraction of “it is” or “it has.” Its is a possessive determiner we use to say that something belongs to or refers to something.
It’s and its are among the most commonly confused words. They are pronounced the same, there’s a very small difference in how they’re written, and it’s also easy to mistake the contraction in it’s for a possessive. But the rules are very clear—it’s is the same type of contraction as “where’s” or “there’s,” and its is a possessive just like “my” or “your.”
from Grammarly Blog https://www.grammarly.com/blog/its-vs-its/