How and where is wordpress adding mySQL content to database?

The files on your server are the WordPress app, themes, and plugins. All page, post, widget, user, and plugin data only exists in the database.

When you create a page or post, add a user, leave a comment, etc., WordPress is writing that data to the database and nowhere else. When a visitor loads your website, the data is loaded from the database and inserted into your template for each page view.

Without the data in the database, the content for your site is irretrievably lost. This is why regular database backups are important, and care should be taken in moving the data.