Flatpaks are easier to use in most distros. If you’re using NixOS, then Nix of course. But if you want to do a lot of CLI stuff, then Nix may be better too.
They can be isolated because Nix has in-built support for three different levels of sandboxing - virtual machines, containers as well as ephemeral shells.