Monterey is too fast for some old flash drives
FYI: macOS 12.5.1 Monterey does not anymore format an oldish but slowish Transcend 16GB flash drive to APFS because it timeouts after formatting is as Mac OS Extended while waiting for Spotlight when unmounting for the subsequent APFS format. Booting the same Mac mini 2018 to Mojave, this succeeds as usual as does formatting as plain Mac OS Extended.
Making a bootable macOS 12.5.1 Monterey USB flash drive via the Terminal works although it takes over 30 minutes (booting to it succeeds quite fast).