Many distros with many approaches, yet not a single one with a convenient security feature that comment is mentioning
So it's not "up to me" if the good choice is not practical
So it's not "up to me" if the good choice is not practical
Distros clearly don't allow this and none has this feature or these commands preinstalled by default, nor they are built to be multi-user OSes. :D
The actual solution in that space is Flatpak.