You can do this with either event receivers or the aforementioned SharePoint 2013 workflow calling the REST API.
With event receivers you'll need to host the code that actually executes your commands outside of SharePoint Online. The easiest way to do this is with an Azure function. From there you can either use Powershell or the REST API to create and delete subsites. However, you can only use Powershell if you have global admin rights.
Using a SP2013 workflow to call the REST endpoint will be more self-contained and probably the easier choice if you're not trying to do a lot of custom site provisioning steps.
Either way, the REST endpoint you're looking is: http:///_api/web/webs/add
Microsoft's documentation is below: