Two best ways to disable Command Prompt on Windows 11 are using Group Policy Editor and Windows Registry Editor.
For Group Policy Editor method, open Local Group Policy Editor, navigate to specific path, enable 'Prevent access to the Command Prompt' policy, apply changes, and restart the computer.
For Windows Registry Editor method, open Registry Editor, navigate to specific path, create new key and DWORD value, restart the computer, and access Command Prompt to see disabled message.
To address Command Prompt pop-up issues on Windows 11, install pending updates, remove hidden malware, and consider using antimalware programs like Malwarebytes.