It's just a piece of cake. when you contract is or has, you need the apostrophe:
David's come = has come.
David's here = is here.
The weather is fine. It's fine.
The vase has been broken. It's been broken.
When it is a pronoun, no apostrophe:
The dog wagged its tail.
The sentence is long, I can't understand its structute.
Hope it helps.
Student or Learner