ESP 01 not work when use external power source

I’m using esp 01 with simple blink code. where GPIO 0 pin connect with Led positive and negative to ground after uploading code, its work when led is connect after the code upload is done its work correctly. but when led is connected before code uploading it cannot upload code.
if code upload then led is attached permanently then give power supply led cannot blink its glow continue.

It might be helpful if you explained in more detail how you’re uploading your code, how you’re powering your ESP-01 and what you’re doing with your CH_PD pin.

Pete.