dns – Use a single domain for different applications

Hi, I'm setting up a server for a
I would like to use my domain for two applications, site and server.

For example: when you access mydomain.com in the browser, open the default port 80 and enter my hosting … And when you enter the game, the default port is inserted 25565, that is-to that when I connect to mydomain.com, log in to mydomain.com:25565 by default.

Could someone explain me how to proceed?