Same problem here with gnome screen recorder (not gnome-screenshot which does not do screencast). Also can not add video screen recording source to OBS so it might be a system-wide issue.
[edit] it seems to be a wayland issue. I tried recording with simple screen recorder and it showed a message saying it was compatible with Xorg but not wayland. Then it produced a black screencast with only the mouse visible.
[edit 2] I installed wireplumber for pipewire and it surprisingly stopped crashing. I might have done additional things but I do not remember. (but still no capture source for OBS)