In WordPress there are 2 types: Hierarchical Post Types and Non-Hierarchical Post Types. Pages are by default hierarchical and Posts are by default non-hierarchical. There may be plugins to change how this works, I could only find 1 which doesn’t look well received but may work in your case: Add Hierarchy (parent) to post.
If you can’t find a plugin to do this for you, you would need to get your hands dirty with some custom PHP. If you’re not comfortable doing that kind of thing then maybe creating a new Post Type would be easier.
The Custom Post Type UI plugin gives you a user interface to create new post types similar to Posts or Pages in which you can tell it to be hierarchical and define your own permalink structure. There are quite a few good tutorials and plugins to help with this, the following tutorial is just one of many I thought may be helpful:
https://torquemag.io/2015/12/wordpress-custom-post-types-tutorial/
Hopefully you find the above helpful. If you’re looking for a pure PHP route you can reply back and myself or someone else may be able to jump in and show an example on how to achieve this. Though, it’s not recommended if you’re not familiar since it can bring down your whole site if not done correctly.