Many of the products you mention are powered by some SQL db. Either MySQL or postgres should be fine.
This is old, boring tech but works fine and will scale up without issues for the workloads you mentioned. IIRC even stackoverflow.com is powered by a SQL db.
For a beginner, learning this will offer most value.
For more scalability, you have to enter nosql territory. Typically you add caches in front of your db to speed things up. These are not tables, but key-value stores. Redis and memcached are quite popular.
When you need even more, you can use nosql databases. Normally you would just use what your cloud provider offers, unless you have a team who can administer your own. However, it’s important to understand that they don’t offer more functionality than SQL dbs, but less: features are often sacrificed for the sake of performance, at the expense of increasing complexity as well.
So in my opinion, just learn SQL first, and anything else if needed.