Y-Comm is the brand new Online System found in Pokemon Sword & Shield. By clicking the Y Button at any time while playing, you will be taken to the Y-Comm Screen. Here, players can search for Trades, Surprise Trades, Battles, Group Max Raid Battles, or to Share League Cards. Players must first connect to the internet before participating in any of these activities, unless they would like to play locally with others playing within the same room as them. Players will randomly play with other trainers if any of the activities are selected while online, or they can set a number code (which can be shared) if they are looking to do so with specific people they know in the real world.
We have questions and answers related to this topic which may also help you: