Hey Raffaele!
Yeah the custom widgets are like the old version to create custom components.
Currently the best way to create a custom widget is through the pluggable widgets:
https://docs.mendix.com/howto/extensibility/pluggable-widgets/
You can check that documention to learn how to make one. They are based on react and you create them for web and native applications.
Hello Raffaele,
Besides the link posted by Emilio, there's a Learning Path about Custom Component Creation in Mendix
https://academy.mendix.com/link/paths/142/Build-a-Pluggable-Widget
But It's still using 9.18.1, though.