I had a laptop HP it has
i5 8th gen, 8GB ram, AMD Radeon R5 M330
so when i play games like Fortnite or valorant or any games when charging is plugged in there will be FPS drop suddenly but after some time it will be fine but that sudden FPS drop happens frequently
But when I play when charger is not connected it will be fine no FPS drop
can you please help me with my problem
Have you checked your CPU and GPU temps while playing games?
This sounds like it could be related to thermal throttling, because of high temps.
Check your temps and make sure to try and stay below 90°C.
If your temps are higher than that, you might have to clean your air vents/intakes.
When you play on battery mode, your laptop will most likely not use all the available hardware potential.
Which will result in a bit cooler temps and therefore no throttling (or less of it).
But when you plug it in, it can use all of the hardware's power potential and therefore temps can rise higher.