How to inherit a database

How do I insert data from one database to another using a filter? the filter could be a tag or a .contains()

Thanks!

Just use Wix Data Query or Wix Data Filter and save the results into the new dataset.
https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html
https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html
https://www.wix.com/corvid/reference/wix-data.html#save

Depending on what you are trying to do, you could also look into using Bulk Insert or Bulk Update.
https://www.wix.com/corvid/reference/wix-data.html#bulkInsert
https://www.wix.com/corvid/reference/wix-data.html#bulkUpdate
https://www.wix.com/corvid/reference/wix-data.html#bulkSave

You can also just look at using Dataset Get Current Item function too.
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#getCurrentItem