What you are describing, almost sounds like you have managed to use a significant amount of the device's storage. How much free storage is available on your device?
You mentioned that you cleared the "ram", but I think that maybe you mean that you Booted into Recovery & Wiped Cache?
If it were my device, there's a couple of things that I would do:
- Open the Camera app & go to IT'S Settings & Reset the Camera's settings.
- Uninstall unused apps.
- Backup the device with Smart Switch & Factory Reset.
I'm pretty sure that you'll notice a significant increase in the performance of the device.
2. MOREOVER, CLEARING RAM MEANS, (IF YOU USED SAMSUNG UI) THERE IS A FEATURE THAT ALLOWS TO CLEAN UP THE MEMORY BY STOPPING THE BACKGROUND APPS.
3. ALREADY RESET THE CAMERA APP SETTING BUT STILL LAGS AFTER ONE OR TWO DAYS.