Raspberry pi freezes completely if rebooted while mainboard is kept powered

You might be suffering from Kernel 6.6.16 freeze with rpi2 rev B when using usb device · Issue #6100 · raspberrypi/linux · GitHub
Try adding the line

dtoverlay=dwc2

to the end of the /boot/firmware/config.txt then reboot.