Login and clocking issue

My xbox series boots up then when i try to login my username it clocks for a minute or 2 sometimes it will login me sometimes it dont, also when i try using apps and other features like game pass and the store etc is does the clocking every time eventually it gets me in. Ive had console sent out for repair 2 times and as come back saying its working.

First Try to replace your wifi card , if problem persists then I would recommend you to clone your drive and replace it, maybe is failing

Thanks for the info, i run it through ethernet and tried it on wifi bit still the same. I tried telling the warrenty people that it could be the hard drive failing and that the repair place they send it to may not be picking that up when testing the console