Error following documentation to access camera from OpenCV. (linux headers I believe)

When I follow the documentation found here: https://www.arducam.com/docs/cameras-for-raspberry-pi/pivariety/how-to-access-and-program-the-pivariety-camera-using-command-line-python-opencv-and-gstreamer/

Section 2.2.1

I get an error that I don’t have python2 installed. After installing python2 and rerunning the script I get

*** SoC: BCM2711
ERROR:
Destination directory missing: /home/pi/5.15.32-v8+

Help: rpi-source/README.md at master · RPi-Distro/rpi-source · GitHub

I know this relates to the linux kernel/headers but I’ve been stuck here for days. Can anyone point me in the right direction?

It seems that you didn’t create the output directory?
try:
mkdir $(uname -r)

One thing to note though, rpi-source seems to have stopped being updated, so accessing it with python3 may not be available on recent systems.