This topic has been discussed extensively, so I recommend doing a search to find more information. Here is one relevant discussion about tree structures in widgets:
Anytype doesn’t operate on a hierarchical model, so while you can mimic hierarchical workflows to some extent, objects cannot be true children or parents of each other as they can in other applications.
If you want all new objects to automatically generate a link without manually adding a relation or template, use Collections. Objects created in a collection will be linked to that collection. Additionally, creating custom Templates is essential for automatically adding relations to a new Type.
For more details, I recommend exploring our documentation to understand the basics.