@Joaovitor, your English is very good, no need for apology.
You certainly can do what you propose. I've recently setup this very thing. You don't say which operating systems you're using and I can only address Linux and Android because they are all I've used for about 12 years now.
On my firewall box I installed OpenVPN and on my phone OpenVPN Connect app. There is TOO MUCH info available for OpenVPN and much of it is for previous versions where things were done differently. Once you get the current info for your systems it is fairly straight forward. I used a different box to install easy-rsa (a set of scripts to remove some of the confusing parts) to configure a Certificate Authority and create keys and certificates for both ends of the VPN. I still found it somewhat confusing to get all the files in there proper location but it was a one-time effort. Once the keys and certificates are generated you won't need to mess with the Certificate Authority again until you wish to add more users/clients for VPN access.
You will have to know a fair amount about networking in general to get the tun device (analogous to eth or wlan devices) setup and configuring your firewall to allow access to the VPN.
Depends very much what VPN you are using and how/where it is terminated. There are many different types of VPN as you may be aware.
Some use 3rd-party servers which is OK if you trust the server and there is a suitable client. I think Hamachi falls into that bracket. NGROK is a popular choice.
You could also set up your own VPN if you have a router that supports it or you could use a Pi, NAS, etc to run one. Then you can use a standard client that you will get for any type of device. The downside is that you need to configure your Router to allow the connection. Not that hard really.
Or you could go with an SSH based approach where you run an SSH client configured to allow transparent routing of traffic to the SSH server.
Well, first thanks to everyone for the tips and help.
I am new to the area of communication protocols and I entered this world initially through mqtt due to an iot project. I even got to know node-red through this project.
As I said, everything is very new and I have very little help, because the material in Portuguese available is very scarce.
Despite this I will try to follow the tips provided. Any doubts I believe I can resort to the forum.
Note: some asked which machine I use. It is a computer with windows 10. I have read a lot about raspeberry pi and I intend to work with one in the future, I believe it is much more effective in my application.
If you are new to VPNs etc (and have limited resources in your native tongue) then i would highly recommend ZeroTier one - it removes a LOT of the complexity from you when you get started and will scale well if you need it in the future.
It is a simple install on both WIndows 10 and Linux and is almost seamless once running
I tried out pivpn on an old RPi-1B. It worked fine but the throughput was very slow (as expected).
I bought a RPi-4B and installed pivpn on that animal, works like a dream.
I use OpenVPN GUI with it from my PC, laptop and tablets.
Really easy to generate a user/password (in the RPi) and insert into the above devices.
You can also do what you are seeking using Real VNC. You create a free personal account (up to 5 devices) and can access your pi securely from anywhere in the world via cell phone, tablet or PC. It find it reliable and it's fairly easy to set up and extremely easy to use (connect / disconnect) once set up.