I use pass: https://www.passwordstore.org/ - a password manager for the commandline that can be synced with git and stores the passwords encrypted using gpg
I have slowly been migrating from LastPass to pass and am just about ready to go all in. There are a few hoops to jump through to get it working on android (a requirement for me), but nothing too bad. The one thing I am having to make a habit is always doing a git pull whenever I open it since I use it across multiple devices.