Hello Fazal Husain, thanks for posting in the community.
Please check if “Automatically restart” is enabled and turn it off by opening System Properties, going to Advanced, then Startup and Recovery. After that, run the following commands to repair system files:
sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth
If the issue continues, random restarts in Windows 11 version 25H2 can be caused by system errors, outdated drivers, or hardware issues. You may also run the Windows Update troubleshooter by opening Settings, going to Troubleshoot, then Other troubleshooters, selecting Windows Update, and running it.
Hope this helps.
Kind regards,
John Oli