Install Auto Dark Mode from https://github.com/AutoDarkMode/Windows-Auto-Night-Mode by using a command prompt with administrative rights and then run:
winget install --id Armin2208.WindowsAutoNightModeOpen Auto Dark Mode (use Windows Search) and configure it to your liking.