If your aim is to only record gameplay (and not stream), then there are far better Wayland-native tools like wl-screenrec[1] for wlroots-based compositors and gpu-screen-recorder[2] for others. The latter even supports live streaming, so could be used as a lightweight alternative to OBS.
[1] https://github.com/russelltg/wl-screenrec
[2] https://git.dec05eba.com/gpu-screen-recorder/about/