is it possible to achieve something similar to macros in 1.19?

Basically I was asked by a friend to make a datapack for 1.19.4 that adds a "tp wand" thet let's you set tp coordinates and then tp to them... And I just realized that macro wasn't a thing in 1.19
Continue to help post