Esp8266 ch340 VS cp2102

Is there any difference between CH340 and CP2102, while i program the ESP8266 ?

Or it’s not important if the chip is ch340 or cp2102, and i can upload the same code in each of them?

Both are USB to UART chip, so it does not matter which code you upload. Only one is bit better than other. the code depends on controller chip which is using the CH340 or CP2102.