That tank is WAY to small for either of those fish. Rehome the goldfish and put the guppy in a 10gal. Then you can put a few more guppies in there and they will be healthy and happy.
A single goldfish needs a 30gal to be happy. Your fish are poisoning themselves in such a small tank. While you are at it, buy a liquid test kit to measure the parameters of your tank. Such as Ammonia, Nitrite, Nitrate, and PH.
Research what the ammonia cycle is and how to cycle a tank. Until you get a new tank to put the fish in do water changes daily 30-50%. You are killing your fish, both fish in there are peaceful and are unlikely to attack one another.
40Gal Planted- 10Gal RCS Planted
6 Julii corys, 1m Furcata Rainbows, 2f 1m Bose Rainbow, 2 mystery snail