Its shows possession.
- The dog wagged its tail.
- The company changed its name.
- The country is proud of its culture.
It’s is a contraction of it is or it has.
- It’s raining. → It is raining.
- It’s a good idea. → It is a good idea.
- It’s been a long day. → It has been a long day.
Quick test
Try replacing it’s with it is or it has.
If that works, use it’s. Otherwise, you probably need its.