''when the person you wanted to give the world to ends up being temporary''
It's like a meme with a baby sobbing video.
What does it mean? Why is it ''ends'' instead ''end''?
You might not have split the sentence correctly.
*when the person you wanted to give the world to ends up being temporary
So "the world" doesn't "end up". "To" is part of "give something to", not part of an infinitive.
"The person you wanted to give the world to" = boyfriend/girlfriend you think you will stay with your whole life. That is, "your soulmate".
"ends up" means "finally becomes". If a boyfriend is temporary, that means you "split up"
So the whole sentence means "When you split up with your soulmate"
It is "ends" because "end" is a verb in this sentence, and it is in the third person singular form, to agree with "person".
It's simply number agreement, though it has a relative clause between the subject & the verb.
The person ends.
The people end.
One ends.
Two end.
when the person [you wanted to give the world to] ends up being temporary