They are different solvents with different dissolving properties. Methylated spirits is predominantly ethanol, whereas IPA is predominantly isopropyl alcohol. IPA is quite good at cleaning greasy marks, fingerprints, solder flux etc, from glass, circuit boards, tape heads and optics. It evaporates more slowly than meths. The IPA in my cleaning supplies is >99.9% pure and it should evaporate with no residue.
Pure anhydrous alcohol >99.9% would also be a clean solvent except you can't obtain it outside of a chemical laboratory and in any case it does not dissolve flux or grease very well. Methylated spirits is ethanol mixed with some methanol to make it poisonous, a bitter substance to make it undrinkable, and a purple dye to warn you what it is. It should be a fairly clean solvent but the dye and bitter substance could be left behind as a residue when it evaporates.
In the USA methylated spirits is rarely found. What you find instead is denatured alcohol, which is ethanol mixed with some gasoline and other adulterants to make it undrinkable. I really wouldn't want to use this as a high purity solvent, but in any case it doesn't dissolve solder flux so it's of little use for cleaning circuit boards.
For optics, methanol is often chosen as a cleaning fluid. This you may find from an optics supplier like a camera shop or a telescope shop. However methanol is poisonous so it should be used with care. Wear rubber gloves, use it in a ventilated area, don't get it on your skin and don't breathe the fumes. If you get 99.9% pure methanol it is a very clean solvent that will leave behind no residue at all and will evaporate quickly.