Last time you did pwc
Do a series of water changes.
If it's been longer or around 11/2 to 2 weeks since doing a pwc
change 25% of the water then immediately change another 25%.
Then wait an hour or 2 do it again.
***The next day do a 40% water change.
On that one, you can vacuum some muck out of the substate.
Then do 30% pwc
for the next 5 days.
If you have done a 30% or more water change in the last few days start above at the part where there are 3 / ***.
Reason being to change basically all the water to new in a week.
And to do it somewhat gradually to minimize stress in the sudden change of water quality.
New water and old tank water are probably very different parameters.
So although a 100% water change might be needed in the tank the difference in old tank water and new tank water could shock the fish with the difference.
Make sure to use dechlorinated treated water every time and check the temperature it is not colder than the tank water, should be very much same temperature.
Your fish should start feeling better with clean new water.