Use an offline password manager, avoid SaaS. Make sure it's secured with Argon2 and burns a a few seconds of compute to unlock. Use hardware MFA tokens for your most critical accounts.
You could also tie individual copies of the database to the machine's TPM and only sync after decrypting (yet another factor).
> I believe there are alternatives that are more secure such as using a mental algorithm that generates a unique password per site.
That gets tedious when you also have to conform to stupid, different password policies on various sites.
If you want to compartmentalize things you could use multiple password databases with different master passwords? The master password is still something you have in your head.