Windows 2025 server has a new feature called OSConfig that permits you to configure Microsoft"s recommended security settings.
This can be done through powershell, Windows Admin center and Azure Policy
More details and command lines could be found here: