If you want to disable any user to prevent that the user logs into his/her account on Ubuntu or lock the user’s account so he/she won’t be able to log in and access the privileged rights, you can do it
How to deactivate or disable a user account in Ubuntu 20.04 LTS
