Xbox series x has no network connection

I have a xbox series x that I got from a friend who said he opened it up and cleaned, after reassembling it the xbox would not connect to his network . The xbox says there is a wired connection when there is not and the wifi would not connect, so he did a factory reset that wont complete, it gets stuck on the update part and wont connect on my wired or my wireless. Xbox on his network and mine wants me to enter the ssid for the wireless but when i do it tells me the type of wifi is wrong and the wired gets nothing. I disassembled the xbox and could not find any issues. No sighs anywhere of liquid damage, no cable damage etc. I downloaded osu1 from Microsoft and booted from a flash drive and everything is good until the update part and it gets stuck there and has the same problem. Any help would be appreciated.