This is a problem on Microsoft side, has to do with the latest patch/update last week that is bugged and caused the problem.
Many people are having the same problem: DO NOT factory reset your Xbox : r/xbox (reddit.com)
Also me, I panic and factory reset the xbox but still getting the same error as other players that they can't connect to the EA servers, there is nothing wrong with out network!! the problem is on Microsoft/Xbox's side and they need to solve it.
Hope they solve it soon, so we dont have to wait until next update :/:/
but it could be days, weeks, hopefully sooner,,,
so this is an xbox issiue ☹️
Xbox games won't go online after reset august update - Microsoft Community