So if you can't protect versus all the threats, you may as well not do anything?
Instead, when you want to elevate privileges, you should do so by using a mechanism that takes the control of the machine away from less trustworthy user - such as a Secure Attention Key or similar mechanism.
$ ls -l /usr/bin/passwd
-rwsr-xr-x. 1 root root 33424 Apr 1 2022 /usr/bin/passwd
The "s" above indicates that the program is allowed to call the setuid() family of functions to alter the real, effective, and/or saved user id.You would not be able to change your password without the functionality.
The former are fine since they don’t allow arbitrary commands/escalation, and the latter (IMO) you should not use because it’s impossible to use them safely as you can’t trust the environment (the display server, terminal emulator, shell, etc.) to do what you say if it is compromised.
In practice, some of them will have bugs (and the kernel also has privilege escalation bugs frequently) so I don’t consider the user/root separation a particularly strong security boundary. For me it’s more of an additional layer against not very sophisticated attacks.