That's strange as PostgreSQL is easy to install on Windows, maybe the problem is in your NSIS installer, try to install with the standard PostgreSQL installer from EDB:
PostgreSQL[
^]
There is also a portable version of PostgreSQL which does not need to be installed:
postgresql-portable · GitHub[
^]
A possible cause of failure can be missing Visual C redistributables, check the Windows event log for errors, see:
The latest supported Visual C++ downloads[
^]
PostgreSQL Portable offers the same functionality as the normal PostgreSQL version and does not require a local "postgres" user account or administrator privileges, works for any user.
You might also be interested in
LiteDB if you want to avoid installation issues, see:
best-databases-for-a-small-net-application[
^]