The easiest way to fix “an uninstalled pacman” is probably to just download pacman-static, make it executable and run it, installing pacman again: https://wiki.archlinux.org/title/Pacman#Using_pacman-static
wget https://pkgbuild.com/~morganamilo/pacman-static/x86_64/bin/pacman-static
chmod +x pacman-static
sudo ./pacman-static -S pacman
no ISO/USB, chroot needed.