That line is hard for me too… I’ve resolved to singing “bury them in the sand or just Italy” and move on
I had originally heard the song as “and I build you up, time machine. Do anything to make you happy”, so I can’t believe I missed “build you a time machine” since it’s more obvious. I suspect “do” instead of “to”, although “build you a time machine to anything to make you happy” is a cool line. The song has a melancholy to it where the narrator feels a bit helpless, and saying that he’d do anything, even build a time machine, to make the other person happy makes sense to me.