It sounds like the phone is overheating while fast charging and this is causing the phone to lag.
The only fix would be perhaps to not fast charge, or to not use your phone while fast charging.
It can be a common occurrence with refurbished devices or even regular devices, especially older devices as the heat sink and thermal paste on the CPU have probably long degraded.
Hope this helps!