Just got completely switched over to Fedora 40 and was dismayed to discover gnome-control-center reporting no sound devices at all. Not the onboard built in sound, and not the HDMI sound I wanted.
After much googling, I found this web page:
https://discussion.fedoraproject.org/t/f40-regression-internal-audio-output-...
And the suggestion in there worked.
rm -rf ~/.local/state/wireplumber
reboot
So I don't have to switch back to fedora 39 :-).