
To set XAMPP to automatically start on Windows 10, open the XAMPP Control Panel, navigate to the “Config” section, and check the boxes next to the modules you want to automatically launch on startup

You also need disable UAC, here is How to do that https://mskeys.ca/how-to-disable-uac-user-account-control-in-windows-11/.
create a shortcut to the “xampp-control.exe” file and place it in your Windows Startup folder to ensure the control panel opens when your computer boots up.
shell:startup
shell:appsfolder



To view the detail step by step. watch this video: