I want my flow to creat a teamsite when a object is added to a list.
The object will contain name of teamsite, owner and other data that is needed to creat the site.
This is exactly what we need. We need to create customer team sites when adding customer items to a list. We also need to create documentation libraries depending on which services our customers puchased.
Looks like this is exactly what you need:
Create site by custom template and grant permissions
This article explains how to use Plumsail SharePoint connector, which is a part of Plumsail Actions (third party set of connectors for Microsoft Flow with a fair price).
There is also action called Create library or list. So, you can create them as well.