Refer to https://www.ninjaone.com/blog/change-lock-screen-time-to-12-hour-or-24-hour-format/
Using Settings: Open Settings and go to Time & Language > Language & Region > Regional format > Change formats.
Control Panel: Go to Control Panel > Clock and Region > Region > Formats to select your preferred time format.
Registry Editor: Open Registry Editor and go toHKEY_CURRENT_USER\Control Panel\International
For 12-hour format: Set sTimeFormat to h:mm: ss tt and sShortTime to h: mm tt.
For 24-hour format: Use HH:mm: ss and HH:mm respectively.
PowerShell: Modify formats indirectly using the following scripts:
For Short Time format: Set-ItemProperty -Path “HKCU:\Control Panel\International” -Name “sShortTime” -Value “HH:mm”
For Long Time format: Set-ItemProperty -Path “HKCU:\Control Panel\International” -Name sTimeFormat -Value “HH:mm:ss”
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin