Hence, streaming from the same PC you’re gaming on changes the CPU question quite a bit. A 5600X can run a game perfectly well and still hit trouble once OBS starts encoding on the CPU, especially if the game already likes a lot of CPU time. The important part here is not whether six cores are “enough” in general, but how much headroom is left after the game takes what it needs.
With x264, the CPU handles the video encoding in software. Slower presets are more work per frame, and fast or medium presets can become expensive very quickly in a live stream. At the same time, the CPU still needs to feed the game, keep OBS responsive, and deal with whatever else is open in the background.
This is the workload where the 5800X starts earning its extra cores. The 5600X vs 5800X are close enough to each other in single-core performance that the Ryzen 7 is not suddenly transforming game performance, but 8 cores and 16 threads provide more space for threaded work like x264 encoding. That extra capacity is much more useful here than it is in a game that only cares about a handful of fast threads.
You feel this most in CPU-heavy games. A high-refresh shooter, a busy simulation, or one of the larger
cross-platform multiplayer games can already keep the processor fairly occupied, and x264 must work around that load without missing its own deadlines. When CPU usage is too tight, the result is usually not some clean benchmark-style loss of 10 FPS: frame times can get worse and the whole system simply has less breathing room.