FIRMware is SOFTware (code) that contains the instructions to run HARDware. In most cases you would experience it, hardware is running an OS (Operating System) which manages all of the firmware ‘packages’. Many electronics, particularly more sophisticated, have firmware that is directly loaded onto the device which has a proprietary OS with limited to no graphical interface.
I am a layperson so if an expert can weigh in on my take I’d appreciate it!
Firmware doesn’t run on an OS, you’re probably thinking of drivers which are different. Drivers are software that tell the OS how to interact with specific hardware.
Firmware is software that’s baked into specific hardware components and it exists outside of the OS. A visible example most people are familiar with would be the BIOS which is firmware for the motherboard. Hard drives, graphics cards, RAM, etc all also have their own firmware.
Other devices such as microwaves, washing machines, cars, or anything using microprocessors (so pretty much everything these days) also have components with their own firmware. It is true that device firmware can drive a UI on some devices such a as a microwave, but most people today wouldn’t consider that to be an OS (semantics, I know).