M55S is using Snapdragon 7 Gen 1 SOC while Samsung M35 uses Exynos 1380 SOC.
While specification wise and on synthetic benchmarks ( Antutu/Geekbench scores) both SOC 's are equally matched, there is significant difference in day to day usage performance.
Exynos CPU are infamous for throttling due to overheating and low battery life compared to the equivalent Snapdragon counterpart. Samsung always pushes exynos as it is their own production and they don't want to pay royalty to Qualcomm. That's why they priced SD powered phones so high in their lineup. Samsung M55, which is exactly same phone was priced much higher and failed in market due to pricing.
They relaunched M55 with a new name, M55S and have priced it much better. We still don't know what corners they have cut to achieve lower pricing.
TLDR, don't go by specs alone. Avoid Exynos, if you can.