Hi @wasimakram19945
Try starting the phone in [https://www.hardreset.info/devices/realme/realme-8i/safe-mode/|safe mode] and check if it works OK when enabling mobile data or WiFi i.e. no lag.
If it works OK then a ''downloaded app'' (or apps) may be the problem. They may be accessing online data in the background, unbeknownst to you and this slows down the operating system.
A ''downloaded app'' is one that you downloaded and installed on the phone and wasn't pre-installed on the phone when you first got it.
Check the permissions of your downloaded apps in ''Settings > Security > Permissions > Apps''