There are two types of disc brake friction media and the two react differently to different scenarios.
The pad and disc are two components of a friction set and the two are designed to work with each other. Mixing is not optimal.
The two systems are abrasive and adhesive. Abrasion systems use sintered metal pads and adhesive systems use resin, or as it is sometimes called, organic pads.
In abrasion friction sets, the primary friction component is created by a dead loss system where the one component grinds away at the other. Metal pads do this and they required hardened discs to cope with the wear.
In adhesive friction sets, the primary friction component is created by pad material transferring to the disc and coating it so that the friction is between two materials of the same type i.e. brake pad on brake pad. This transfer is a to-and-fro scenario with the end result of some loss through ablation of the pad material.
These two systems are not exclusive and merely dominant in one or the other. In other words, in abrasive brake systems there is some adhesion and vice versa.
New brakes have to be bedded in so that the material transfers at just the right thickness and evenness. When this balance is disturbed, either via gritty riding or contamination, the two materials no longer slide perfectly and go into an aggressive stick-slip-stick-slip mechanism that creates the noise we all so hate. The rate of this sticking and slipping is simply the frequency of the sound we hear - a couple of hundred Hz.
To cure brake noise, you have to start from scratch with new pads and new discs and bed them in properly. Understandably none of us want to do this due to the cost and hassle of the process and we look for shortcuts like brake cleaner and other potions. None work in the long term. The best fix is replace and re-bad and the second best fix is to aggressively sand the disc down so that it ends in a scratchy satin finish. Then de-grease the pads and clean them very well, and sand them flat. Then bed the brakes in again.
There is plenty of material on the web about bedding brakes. Pay attention.
Here's a good, quick education on the two friction pairs.
https://www.tomorrowstechnician.com/understanding-friction-and-formulations/
Read, drink a beer, ride bike.