guix and/or nix
Both are functional package managers and manage dependency trees better than flatpak IMO (also the package description languages mean you can manipulate the package definitions at install time much easier)
If you can’t find a package in guix/nix then it behooves you to use flatpak
Did the room just get a bit colder or is it just me