Hi Даниил Козак.
Thanks for posting here in Microsoft Community, I understand that after disabling TPM 2.0, DMA detection, and Secure Boot in the BIOS, your keyboard and mouse stopped working, preventing you from entering your BIOS password.
This is a known ASRock B450 behavior by disabling TPM and Secure Boot and DMA protection, the BIOS can break USB initialization before POST so USB keyboards aren’t detected early enough to enter the BIOS password but clearing the CMOS (either via the CLRMOS jumper or by removing the CR2032 battery with the PC fully powered off and unplugged) will reset the BIOS and remove the password also restore USB support and bring the system back to safe default settings where the keyboard works again.
May I know if your keyboard and mouse work at all during startup (for example, can you enter the BIOS), or do they only stop working after the BIOS changes were applied?
Best regards,
April P.