Not everyone will need to self-host, it is still possible to host your projects at someone else's instance. If you live in a place where $1 is a lot of money (where is this by the way?) you could either share a server with others who each chip in their $0.10 or just find an open instance somewhere. There are plenty of organisations which host services like these, Github is the best-known but by no means the only alternative.
Gitlab, no. Gogs [1] or Gitea [2], no problem. I run Gitea on an Intel SS4200 (2.4 GHz Pentium E2200, 2 GB, 8 TB JBOD), it hardly causes a blip on this rather anaemic system. The process generally takes up around 35 MB (RSS), it talks to a PostgreSQL database server on the same box. You would not want to run a service the size of Github on this but for a personal repository it is more than enough. If your projects get so popular that they outgrow the hardware or VPS just move to a higher tier.