You’ll get this error if you’re trying to launch your game directly from the Windows File Explorer.
You need to launch the game from either the EA app or Origin. Even if you’re using Steam or the Epic Games Store, they’ll still launch from either of these apps.