How to stabilize the output square wave of a TL074CN (Comparator)
The TL074 and LM324 are op-amps, not comparators.

If you want a device to operate as a comparator, you should use something designed for that application, like an LM319.