Slow processing likely isn't avoidable with the limitations of the hardware you're using.
If the issue is simply that older frames are getting processed, you can separate the image retrieval into its own thread, then pull the latest frame from that each time the YOLO process finishes processing a frame. This will result in a lot of lost frames, but you'll have a somewhat consistent delay. This also works well for ensuring you don't miss intermediate frames for encoded streams, which can result in corrupted frames getting processed.
If the issue is that you expect your frames to be processed faster, you can consider using a lighter model (replace "yolov8n.pt"). I still wouldn't expect to your code to keep up with the frame rate of your camera, though. Another option here is to look into purchasing a third-party AI chip to plug in to your Pi, which would function as a sort of GPU replacement for accelerated inference.