Devices only have a limited amount of fast "Random Access Memory" (RAM) available. ... When it runs out of space in RAM, your device can shift things to and from the much slower (and permanent until explicitly erased) data storage, flash memory, which takes considerable time.
Why do phones get slower over time?
If you've received Android operating system updates, they may not be as nicely optimized for your device and may have slowed it down. Or, your carrier or manufacturer may have added additional bloatware apps in an update, which run in the background and slow things down.
Is it normal for a phone to lag?
Insufficient Memory
Android is generally very effective at managing memory, and frees up resources as and when they're needed. However, if you're using apps or games that need more RAM than your system can give them, you may start to see some lag.