With a Docker Compose file - all you need to do is press enter after the pre-set ports, and add the ports your applications will be using (and make sure you match the amount of spaces before the other ports listed).
In order for the containers to use the ports given, you have to delete the ports in each container and put them into the Gluetun container / docker compose file.
When you set your network mode for the containers you want to have go through your VPN instance, you want to set the network as "container" and then select your Gluetun container name as the network option. Now you should be able to use your apps with their ports as you would normally - except your ports will now be listed only on the Gluetun container. A good way to help prevent any confusion is to use a dashboard like Homarr and make easy shortcuts to access your services and/or make an excel word document and write down what each port goes to.
Everything highlighted on my test server (image below) is what containers attached to Gluetun will look like ports-wise - with a long list of ports after the container name.
Now, I prefer the Portainer GUI, but this should be similar other docker interfaces.
Hopefully this made any sense!
--w