Although the Samsung Galaxy a71 is a mid range phone it should still perform tasks reasonably well.
It's 6 or 8gb Ram dependant on variant is ample enough to manage apps and the tasks the phone performs.
Here are a few generic troubleshooting tips you could try @silentsnow
Ultimately if after trying the above the phone is still affected then Yes I'd agree to approach the source that supplied the phone and request a new replacement.
I wish you all the best with this.
Current Phone > Samsung Z Fold³ 5G.