OBS and other third-party capture and streaming software are great, but there are limitations, let's say you want to stream gameplay from a game console or use an HDMI camera instead of a webcam; the easiest way to get them to work your PC without an external or internal capture card.
With software like OBS, you are entirely reliant on your system resources, such as your CPU or GPU, when it comes to capturing video inputs. That can drain if you capture at a high bit rate and try to play a game simultaneously. Modern CPUs have improved at the necessary multi-tasking, but a dedicated capture card can help lighten the load.
This is less of a concern on some modern graphics cards, as Nvidia's RTX series of GPUs use a dedicated hardware encoder called NVENC to minimise the load on your system, whereas AMD cards can use VCN, or Video Core Next. However, dedicated capture cards can still provide advantages in terms of features and support.
Also, if you dual-wield a PC and console, such as the PlayStation 5 or Xbox Series X, an external capture card can help you pull footage from those devices.