Ideally sites will show you both - a QR code you can scan with your app and a string of characters you can write down as a back up.
To back up 2FA for recovery or installation on other devices, I'd prefer to choose the second method: write it down on the paper or save it in password managers like
https://keepass.info/ or
https://bitwarden.com/When you need to enter the 2FA code in the future, your app will combine that shared secret with the current time (floored to the nearest 30 seconds), hash it, and use part of the result to generate your 6 digit 2FA code. The website will do the same thing, and check that what you have entered matches what they have calculated.
I got troubles with timer on my device a few times. 2FA works smooth but suddenly one day it was broken. Anytime I entered 2FA code to login account, it failed. I had to check and correct timer on my devices to help 2FA works again. I don't know reasons why timer was broken like that. Could you explain it, please.