hacialiyev Hi,
Changing emmc for secure boot era is mostly not possible,
because there are key paired and check mechanism between cpu and emmc which is located in secured area in RPMB.
Once eMMC is damage, and replace by others(Most eMMC is used and refurb from other devices),
secure boot will checked paired key in RPMB, and because it doesn't match, so device will refuse to boot.
For device with unlock bootloader, change emmc will be more easy,
because COT(Chain of trust) which secure boot part of it, is already broken,
so you can easily manipulate boot image and bypass checking paired key mechanism.
But for device with lock bootloader, it will be more painfull.
You may spent alot of time by doing such research and try every possible way in every tutorial which already spread in many community.
But for reference, especially for xiaomi device, you may try to use real new emmc means clean rpmb,
try using several engineering rom to mix bootloader image with public firmware,
only if you have much time to spent with doing trial and error.