Things to try:
SFC/DISM
Make sure you have no corrupt system files that is causing this problem. Open a command prompt as administrator and type
sfc /scannow
Pay attention to the scan results to see if SFC found anything it could not repair.
If it found corruption it could not fix followup with this command (note the spaces)
dism /online /cleanup-image /restorehealth
Restart computer
(Note-you can follow up with another
sfc /scannow command to make sure that dism repaired the files)
CLEAN BOOT
Perform a clean boot to eliminate software conflict causing the issue. If it doesn't happen in a clean boot, you have some software conflicting with Windows. Brink's procedure will help you weed out which one.
Perform a Clean Boot in Windows 11 to Troubleshoot Software Conflicts Tutorial
SAFE BOOT
This tutorial will show you how to boot Windows 11 into normal mode, Safe Mode, Safe Mode with Networking, or Safe Mode with Command Prompt. Safe mode starts Windows in a basic state, using a limited set of files and drivers. If a problem doesn't happen in safe mode, this means that default...
www.elevenforum.com
If a problem doesn't reappear when you start in safe mode, you can eliminate the default settings, basic device drivers, and services as possible causes. If it doesn't happen in safe boot, it's more than likely a 3rd party driver.
Reliability Monitor and Event Viewer might give you a clue as well but I'd try the other stuff before I jumped off into event viewer.