How can I remove the recent apps part on Xiaomi mi A2
"Recent apps" is a standard part of Android navigation and it cannot be removed. You should probably just stop swiping up that long from the bottom and you will never encounter the recent apps screen.