Get current position

Is there an easy and optimised way to get ~ ~ ~ and store it to a storage or a scoreboard?
Continue to help post