Read the forum guidelines
Why my Xbox series x not connecting to my wifi it connects to other wifi and works
What model modem and router do you have? Also, can you get online with a ethernet?