build a family tree from database of 20-30 families

Built by Wix, doubt it when there is WP plugins used on it.
https://builtwith.com/myheritage.com

If you want to connect multiple datasets, then you can look at using reference fields in your datasets.
https://support.wix.com/en/article/about-reference-fields-in-database-collections
https://support.wix.com/en/article/displaying-content-from-multiple-database-collections-using-reference-fields
https://support.wix.com/en/article/about-referencing-multiple-items-in-one-field
https://support.wix.com/en/article/displaying-content-from-multiple-database-collections-using-reference-fields-4034931
https://support.wix.com/en/article/referencing-multiple-items-in-one-database-field
https://support.wix.com/en/article/working-with-multiple-item-reference-fields

As for dynamic pages, you can easily do those.
https://support.wix.com/en/article/about-dynamic-pages-4488730
https://support.wix.com/en/article/dynamic-page-example
https://support.wix.com/en/article/linking-to-a-dynamic-page
https://support.wix.com/en/article/adding-and-setting-up-a-dynamic-category-page
https://support.wix.com/en/article/creating-an-index-page-for-your-dynamic-pages

For the family tree you might have to look at doing it through HTML code, which you can find examples of online.
https://stackoverflow.com/questions/53151296/family-tree-with-pure-html-and-css-or-with-minimal-js

If you want to pass from the page to the html component and from the html component to the page then you can simply use code for that as shown here.
https://support.wix.com/en/article/corvid-working-with-the-html-element
https://www.wix.com/corvid/reference/$w.HtmlComponent.html