Use a local only password manager, such as keepass, and then back it up to a flash drive and other devices in your possession. At least that's how I handle my database. And I've never lost access to it.
Discussion
I use keepassxc on one of my computers but I also self host a vaultwarden instance
I use keepassxc for my laptop and keepassdx on lineageos. I have been using it that way since 2019 and find that it works well. Since my phone is my primary computing device, that is where the main database lives. And then, about twice a year, I back it up onto two separate flash drives. I also have a copy on my laptop, but that one only gets updated if I specifically need something newer that I don't have already. I will do another backup if I make a very large change to it, such as adding a new crypto wallet or something so that I make sure not to lose that. But otherwise I found that it works quite well.