Automatically generator a WordPress installation on my subdomain

You’ll want to setup a Multis-site network – https://codex.wordpress.org/Create_A_Network

If you know your way around code what you’ll need to do is use the wpmu_create_blog() function – https://codex.wordpress.org/WPMU_Functions/wpmu_create_blog – to create a blog whenever a user registers.

What I would recommend would be a front-end form so when someone registers they can enter the name of the site they want this way you hook into the form save action to then create the site based on the user. Also doing so this way you can add a security check in place to prevent spam. If on the other hand you create a new blog whenever “anyone” registers this could be exploited fairly easily.