Read the forum guidelines
Why my Xbox series x not connecting to my wifi it connects to other wifi and works
That would be hard to diagnose with the limited information you have provided. Could be any number of issues. Try watching youtube video's on how to connect your Xbox Series X to the wireless network you have. You might find something useful.
What model modem and router do you have? Also, can you get online with a ethernet?