The same way that all other 3rd party services do it: keep your systems up to date, do not expose unnecessary things to the outside, use strong passwords and SSH keys.
Vaultwarden also stores/syncs a local copy of your vault on each device. So if my home lab goes down or explodes or something, I can still sign into my cached copies then export and import onto a new instance