For casual gaming, both should handle things pretty well, but the Galaxy A55 has a slight edge because of the processor. Samsung's Exynos has a bad reputation, but honestly for Genshin Impact and Call of Duty Mobile it runs fine - it's the ultra demanding games that give it trouble. The Motorola Edge 50 has a less powerful processor (Snapdragon 7 Gen 1 if I remember right), so in the long run it might start showing wear a bit faster as games get heavier.
Where you really need to look is battery life and thermal management. The A55 has a good-sized battery and Samsung does a decent job cooling it. The Motorola's also solid on that front. If you play for a few hours straight, both will get a bit warm but it stays normal.
For durability over 2-3 years, I'd lean toward the Galaxy A55 - you'll be more comfortable even if games get more demanding. But it also depends on your priorities: do you prefer a smoother display, better battery life, photo quality? And are those really the only two games you want, or do you want to be able to test other stuff later?