How can i make matchmaking systam like pubg

Look at these videos and try to do what they do there. It will give you an overview of many systems including multiplayer, matchmaking and lobby.

Hay there iam a learner and iam making a battleroyal game and i got stuck at a point in making my mainmenu that want that when a player hit / press play button it show a loading screen and ij background search for available match / sessons and of there are not any sessons create a sesson or if it is there join it and it can only join sessons when they are in lobby. Plz help need to know how to do that or if it can be done in c++ plz help me by sharing a link for a video or documentation which can help

They have an online database with all server IPs and infos about how many players on each server etc, So your first step is to have an online database where all servers are going to connect to and update their status there (Full, need players etc)

Then in your client you’ll run some online function that checks the database for non full servers that can host players, once found you’ll be handed an IP and port and your client can execute something like Open IP:Port command to join a particular server IP.

Dedicated server can help me in that situation ??

no, the dedicated server is just a server instance of the game (one map, game mode etc.). I think EOS can help you in case, if you will run sessions (for ex. dedicated game instances) manually.