Regarding the US, as an European the ESTA is tied to the passport, so when it expires (or you lose it and have to renew it), you have to redo it. So yeah, usually it's ~10 years.
EDIT: sorry for the misinformation, ESTA expires after 2 years OR when the passport expires [0]
EDIT: sorry for the misinformation, ESTA expires after 2 years OR when the passport expires [0]
[0] https://help.cbp.gov/s/article/Article-1126?language=en_US