Why do you still want to use the ESP01 boards?
I assume you at least have the ones with 1M flash?
They are really really limited and if you need to use it in some board designed for this very limited form factor, there are ESP32-C3 versions with this exact form factor like the TTGO T-01C3.
Those do have 4M flash and thus are able to later update via the web interface.
An ESP01 with 1M flash can no longer be updated via the web interface as the builds have simply grown too much.
Anyway, there are flash fixtures available where you can simply connect the ESP01 to and then using USB to flash them.
You can also flash using the web flasher:
https://td-er.nl/ESPEasy/latest/
If you don't have such a fixture, you need some USB to serial adapter board and need to make sure to power the ESP01 using 3V3 which can deliver at least 500 mA.
N.B. not all USB to serial adapters can deliver this and not all do actually output 3V3 even when set to do so. So make sure to always measure the voltage before connecting it to the ESP board.
During flash you need to have GPIO-0 connected to GND.
After flashing you can disconnect this and as the ESP01 is an older board you may need to actually power cycle the board to load the flashed sketch.