I have an additional answer to the ones here as to why the somewhat misleading error message can occur, which is now a newer version, 12.2 vs 9.6, ("The postgresql-x64-12 - PostgreSQL 12 Server service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.)
Apparently, errors in the pg_hba.conf file will cause the error message above to appear, and the service failed to start.
In my case, I had edited the file and failed to comment out (#) a comment properly. After much Googling, I never saw that mentioned but DID finally remember to double-check my edits, and there the problem was a simple mistake.
I fixed it and the service now starts, no problem.
-Windows 10 x64 Enterprise 1909 18363.752
-PostgreSQL 12.2 (Windows)