Nouman Tahir I have worked with ESP8266 and ESP32, but only with WiFi and MQTT.
While the ESP8266 has a highly evolved Arduino core or bootloader based on FreeRTOS, the one for ESP32 is still in active development. So you might have to use the official C SDK instead.
To save costs, you can buy ATMEGA328P chips, 16 MHz oscillators, BLE transceiver modules in bulk and a single USBASP programmer to make your own arduino on a breadboard.
The latter is a better and a more economical choice if you don’t need WiFi.