Why my wifi restart issue solved when removing tx and rx pin?

I have a ESP8266 connection with STM.

I was noted WIFI restart issue at unknown interval .. i am tried to add capacitor across VCC and ground but issue not yet solved . after few days i am remove the TX and RX pin to STM ..then its work normal(no restart issue)

why this happens ?any noise?

how can i put back my RX and TX pin back?

For starters I miss pull-ups on GPIO0 and RESET. That alone will cause problems booting. You also have to add proper decoupling: 100 nF ceramic and a 100 uF electrolytic for sufficient power when transmitting.

Better add a resistor to GPIO15, so you don't destroy the pin if you ever accidentally set it to OUTPUT, HIGH.

Make sure you power supply can deliver the 100-200 mA it needs when WiFi is active.