Troubles connecting ESP8266 ESP-01 to uno or mega for firebase

I am working on a project that has a website that talks to firebase and then have an Arduino get that information. I am trying to use an ESP8266 ESP-01 to connect to the real-time database. Most flash the ESP8226 directly and not the Arduino it seems. Can I still have the Arduino run the code or do I need to flash the ESP8266 and try to get a serial connection? If you find any good links that would be amazing. Sorry if this makes no sense, it is my first time posting. Also the firebase and esp8266 librarys don’t agree and cause errors