Subdomains on the WordPress platform

You should use WordPress multisite: https://codex.wordpress.org/Create_A_Network

If you do not plan to host many subdomains, I would stay away from this solution and install a copy of WordPress in each one. Activating the multisite function can be a nuisance for * ss, especially with poorly developed themes and add-ons.