Android is very good at handling apps and ram. If worse comes to worst android will kill tasks automatically in order to free up space and keep the device running smoothly. Most lag is noticed within apps but that is not really the phones fault, more to do with how the apps are coded and often to do with poorly behaving apps. This can be seen in some apps continuing to run after you have backed out of it and even cleared the recent apps, when you have no use for the app running. It is not essential to clear out recent apps, if the apps have been exited properly, they will no longer be running but cached (Faster loading times if you need the app again). It is however good practice to clear out the recents if you want your device to be running at full potential all the time.
TL;DR This phone is blazing fast running on vanilla android. Android is very efficient with multitasking. This is probably one of the best lag free phones youll find on the market.
Also check this video out, this guy puts out great videos regularly.
Android Multi-Tasking - EXPLAINED - HD - YouTube