If it’s a high-pitched squealing that doesn’t stop when you mute the strings, then it’s almost certainly microphonic pickups. Is it one or both pickups? Select each pickup individually to check.

With either loud volume or high gain, the windings around the pickup bobbin can vibrate if they aren’t pressed tight enough together due to the way they are wound or aren’t wax potted/badly wax potted.

Treat each short length of winding down the long axis of the bobbin as a potential small guitar string, and you can see that if they can vibrate, the pickup will make its own noise. Because you are talking about 4cm or so max of length of winding on a side, the wavelength will be small and so the noise is high pitched. One length on its own won’t have a big output, but you have many thousand turns on a pickup, so they can all add up. Clean but loud will set loose windings vibrating, and quieter high gain will boost the lower levels of vibration to a point when the pickups produce enough output to create a feedback loop.

Pickups with metal covers also need wax filling the space between the top of the pickup and the cover, otherwise the cover can vibrate and also act like a string and make a noise. Press on the pickup cover and if the feedback stops or considerably reduces, then it’s likely that the wax under the cover isn’t damping the vibrations sufficiently. I had this the first time i fitted some covers onto open coil pickups and the wax I put in hadn’t filled the gap properly.

This cover issue can often be cured by pulling the pickup out and heating it with a hairdryer. With cardboard to protect the guitar, this can be done in situ. The pickup needs to get quite hot, so wear gloves. Once you start to see indications of the wax melting, then stop heating and turn the pickup over, as you want the wax to fill the gap between the top and the bobbins. Once it’s cooled down, you can wipe off any wax and try the pickup out to see if the feedback is cured.

If there is insufficient wax in the pickup (maybe the cover is sitting too far away from the bobbins) then this won’t fix it. If you don’t see any evidence of melted wax within 30 seconds or so I’d stop, as excess heat can damage the pickup.

If pressing the cover doesn’t stop the squealing, then it’s the windings that are the issue. Heating with a hairdryer won’t cure this and the pickup will either need to be repotted or replaced.