It’s not you, it’s them.
Multiple EA games, most prominently Battlefield 1 and Star Wars Battlefront 2, have gone out due to some kind of outage. EA has confirmed that it is looking into the issue, but as of right now, there’s no actual news to be shared on this front- so until the problems, whatever they are, are fixed, you will probably get only intermittent connectivity in EA’s games.
Among the titles we know are affected are included Star Wars Battlefront 2, Battlefield 1, as well as general connectivity issues with Origin and EA Access (including the ability to purchase EA’s games). You can check what games are being affected for yourself on EA’s support page.
While you wait for their services to go back up, you should look into other games to play. Might I suggest Monster Hunter World? It’s absolutely fantastic, and best of all, it won’t ask you to pay money for microtransactions or lootboxes either!