It’s unfortunate but I have also started running into similar crashes. They were not this frequent when I had freshly installed Fedore 40 two months ago, but the frequency has only gone up in the last one month.
At this point I am considering switching to another distro but your remark stopped me:
Freezes suck a lot. They may be related to the kernel scheduler not handling tasks right. Or the oomd (out of memory daemon) which doesnt keep your main components like desktop protected.
If you suspect the kernel, you can install older kernels to see if the problem goes away. You can use dnf downgrade kernel* to install the kernel that initially came with F40 or you could even try dnf downgrade --releasever=39 kernel* if you want to try running the kernel that came with the previous release. You will need to manually select the older kernel when you reboot and you can use uname -r to verify what kernel version you are running.
Also, do let us know if you find that your system is stable with one kernel version but unstable with newer versions.