If you get the below error follow the next steps to fix this.
1- To fix this error type “SERVICES” in the search bar of the Windows 10 computer, and then click on “Services app”. Now find the postgresql version you are running, and after you find it make sure it is showing “Running” under “Status”. The next screenshot shows an example for “postgresql version 13".
2- If not, double click on it and then under “General/Service Status:” click START and then OK (see screenshot below)