su -c 'modprobe -r pcspkr && echo "blacklist pcspkr" >> /etc/modprobe.d/50-blacklist.conf'
Works for me. See: https://wiki.archlinux.org/title/PC_speaker#Disabling_the_PC_speaker
P.S. It could be that the computer is swearing at you for shutting it down