At the risk of ruining your motivation to read this entire post (as short as it is), I am going to give you what the U.S. military and others call BLUF (Bottom Line Up Front). You could argue that I actually already did that in the title of this post.
When you mean “it is” or “it has” then you use the apostrophe.
When you are expressing a possessive then you do not.
This is a very commonly misused English pronoun (or noun from another point of view). Maybe less so in the days of autocorrect, but it can be bedeviling. What happens when you have a corporate statement such as:
“It’s becoming clear that during Q4 the firm has increased its revenues by 25 percent.”
It may actually be less clear why the firm doesn’t seem to have ownership over “it’s”own revenues. The addition of the apostrophe by a well-meaning person leads to further confusion on the part of people who know the rule and use it correctly.
Here is another example:
“Its own shortcomings led to the demise of the Soviet Union. It’s come to pass.”
Aside from the complex, if not overly complicated, socio-political controversy that statement could cause we have to pause and wonder why a colossal nation-state doesn’t seem to merit an apostrophe while a short unambiguous sentence does merit one. That’s the rule. Possessive is not denoted by the apostrophe in this particular case. Maybe the contrast between the two sentences, one a very commonly used English idiom, can be a decent mnemonic.
My gentle advice is to use one of these examples, or better yet write your own, to always remember the difference.