On Windows 11, if you want to prevent a specific user from logging into your computer, you don't have to delete the account. You can disable that account so that they can no longer access your computer. Windows 11 includes multiple ways to disable an account, such as through Command Prompt, PowerShell, and Computer Management. Here's how to disable User Accounts on Windows 11.
Disable Windows 11 User Accounts via Command Prompt
Step 1:
You enter the keyword Command Prompt in the search bar, then click Run as administrator .

Step 2:
The new interface appears, enter the net user command to confirm the user account.

Continue entering the command below to disable the user account on the computer. In the command, replace ACCOUNT with the name of the account to disable.
net user "ACCOUNT" /active:no
If you need to reactivate your account, enter the command net user "ACCOUNT" /active:yes.

Disable User Account on Windows 11 from PowerShell
Step 1:
You type PowerShell in the search bar then run it as Run as administrator .

Next, we enter the command below to identify the user account.
Get-LocalUser

Step 2:
Next, the user enters the command below to disable the account. Replace ACCOUNT with the account name to disable.
Disable-LocalUser -Name "ACCOUNT"
After you complete the steps, the PowerShell command will disable the account. If you want to re-enable the user account, run the Enable-LocalUser -Name "ACCOUNT" command.
Disable User Account via Computer Management
Step 1:
You type Computer Management in the search bar and then follow the path below.
Computer Management > System Tools > Local Users and Groups > Users

Step 2:
Right -click the user account and select Properties from the displayed list.

Step 3:
In the new interface in the General tab , users select Account is disabled to disable the account.

Disable Windows 11 User Accounts via Settings
Step 1:
Users access Settings, then click on Accounts in the list on the left. Then users click on Family in the interface next to it.

Step 2:
Select the account and click the Block sign in button under Your family.
Once you complete the steps, the user won't be able to sign in until the family organizer restores access to the account.