You cannot fix a car without knowing what broke. Same goes for your POCO M5S.
: If available, enter Recovery mode and select Safe Mode to remove problematic third-party apps that may be causing the crash. Method 2: Flashing Official Firmware (Fastboot Mode) How to Unbrick POCO M5S
If the device can enter Fastboot mode (Volume Down + Power), you can flash the official stock ROM. How to Unbrick POCO M5S?, How To - HardReset.info You cannot fix a car without knowing what broke
To unbrick a (codename: rosemary), you typically need to flash the official stock firmware using a computer How to Unbrick POCO M5S