Go to the Y-Comm by pressing Y, then connect to the internet by pressing the + button. After you do that, press X to load new stamps. You should see a list of people asking for trades, but there will also be some Max Raid Battles. Press on one of the Max Raid Battle invites that doesn't have a lock symbol in the bottom corner, then click join in. Once you do that, it will take you to a screen with the silhouette of the Pokemon in the Raid Battle, its typing, and how many stars it is. Click 'Start a Challenge'. Once you do that it will either give you some error and kick you out, or you will begin a Raid Battle with other people.
If you have it on local communication, and you know anyone around you who plays Sword/Shield, you can do a Raid Battle with them.