Wifi stops working followed by whole system freeze

Fedora 36 kde randomly freezes on my laptop. Basically, before the system freezes the wifi stops working and the wifi icons turns red. It shows the wifi is connected but internet doesn’t works and then I click on the icon to disconnect wifi but this causes the latte dock to freeze. After few seconds the whole system freezes. At that time if I open the system monitor its doesn’t show any stats, like no processing graph, no RAM graph or any network history. And if I try to reboot system it stucks at stopping two processes ( network manager.service and wpa_supplicant.sevice ) forever and sometimes it also shows a PCIe bus error. I will attach more screenshots later on for better understanding.
https://imgur.com/a/tp4OaLA