Prerequisites from https://sos-berlin.com
Access to a time server
Time Servers usually operate on UDP Port 123, make sure that you can access to a time server from Port 123. If you have firewall in place , you should allow outbound connection request to port 123 of the time server you want to use.
Open an elevated command prompt (Run As Administrator)
C:\WINDOWS\system32>w32tm /register
W32Time successfully registered.
Go to Control Panel/Administrative Tools/Services/ and locate the Windows Time Service

Right Click and select Start

Right Click on the "Windows Time Service" and select Automatic from dropdown menu.

Click on the Apply button , then OK button.
Check your time service
C:\WINDOWS\system32>w32tm /query /peers
#Peers: 1
Peer: time.windows.com,0x9
State: Active
Time Remaining: 32733.8396566s
Mode: 3 (Client)
Stratum: 3 (secondary reference - syncd by (S)NTP)
PeerPoll Interval: 17 (out of valid range)
HostPoll Interval: 10 (1024s)