LM393 voltage comparator is not working
LM393 input common mode voltage range is 0 V to Vcc - 1.5 V. In the comments you say:-

my triangle wave is going to the inverting pin (pin no -2) voltage is
4.5 volt for non inverting pin sin wave is going to the pin no -3, voltage is 5 volt , pin no-5 as VCC of LM393, 5 volts

5 V - 1.5 V = 3.5 V. It will not work properly if either input voltage goes above 3.5 V on a 5 V supply.