Saving a position, and then teleporting back to that position help! 1.21.1

I want to create a weapon in 1.21.1 that works where you can mark a location with a shift and right click, and then teleport to that location with a right click. I don't know how to differentiate between shift clicks and non-shift clicks yet, and I also don't know how I could save a position. Thank you!

Continue to help post