Get your desired Debian version for raspberry pi 3 from https://raspi.debian.net/daily-images/ Write it to the sdcard with:
xzcat 20210408_raspi_3_bullseye.xz | sudo dd of=/dev/{YOUR_DEVICE} bs=64k oflag=dsync status=progress
If on macos, get the device name with:
sudo diskutil list
and umount any mounted volumes e.g.
sudo diskutil unmount /dev/disk4s1
NOTE: Also omit oflag=dsync on macos.
When done mount the sdcard (mount /dev/sdb2 /mnt) and chroot to it (chroot /mnt), also mount first partition (/dev/sdb1) to /mn/boot/firmware before chroot.