This tool is available under the Advanced Options of Windows Recovery option. It can diagnose the logs, and fix complex startup problems automatically which does not let the computer boot properly.
If when you boot your Windows 11/10 device ... Run the Startup Repair three different times because sometimes it takes three runs to fix it. If this does not fix your problem, move on to the ...