Redmi Note 7 is a premium built, good performing and long lasting smartphone.
It has ads built in it's UI but most of them can be safely disabled.
If you like the stock Android look, get Google or Nova launcher or simply flash a custom ROM.
Samsung uses their own inferior chipsets in some smartphones and their budget phones are not worth it.
Advantages of Galaxy A40: NFC, dedicated sd card slot and 25 mp selfie camera.