If you’re trying to figure out whether you should write it’s or its, swap in it is or it has. If the sentence makes sense with either of those substitutions, use it’s. If the resulting sentence doesn’t make sense, you need its.
It’s is a contraction of the words it is or it has. (Interestingly, we don’t really contract it was into it’s.)