My Sony wh1000xm5 doesn't pair

Hi guys I recently found my headphones after 6 months. The reason why I stopped using them before is cause they couldn't pair. Like the power turns on and it's charges. ANC works and stuff but I can't pair them.

Yesterday I got them to work temporarily but now they disconnect as I am listening to music and now they just wont pair. When I plug them into my laptop with the wire they work in both ears but the sound quality is worse.

I've tried hard resetting and and stuff but nothings worked.

Any tips?