@lilziegler02
When you have started the game and are in the main menu, there is an item called League Racing, just below the local multiplayer. Go there and scan the QR code with the camera of your cell phone. This code will take you to a page where you can log in with your EA login data. If this works, you will see your games, including F1 23. If you have selected F1 23, there will be leagues displayed. There you can create a league for you and your friends. I think after that everything is self-explanatory.
With kind regards
Alkenvogel