Maybe you can't build a 4.x kernel from 6.x...
Code:
Debian 12 build RT kernel
cd ~
sudo apt update
sudo apt install build-essential bison flex bin86 qtbase5-dev pahole
sudo apt install libncurses-dev pkg-config libelf-dev libssl-dev
mkdir k6-0-5
cd k6-0-5
wget https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/linux-6.0.5.tar.xz
wget https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/6.0/patch-6.0.5-rt14.patch.gz
tar -xpf linux-6.0.5.tar.xz
gunzip patch-6.0.5-rt14.patch.gz
cp patch-6.0.5-rt14.patch linux-6.0.5
cd linux-6.0.5
cat patch-6.0.5-rt14.patch | patch -p1
make xconfig
make -j $(nproc)
sudo make modules_install
sudo make install