At least do a google takeout backup. I believe there are ways to import that into software like immich (a self hosted alternative)