Immediate flames? I run. If there are people down there I would run towards them probably to see if the fire can be put out or if I can help. Otherwise if I don’t see any people and there aren’t any there that I’m aware of, I might grab something quick like my medication or car keys if I think I have time or another escape route (like a window on ground floor or the floor above), and leave the building
When I was at my ex gf’s apartment, we woke up at like 4 am to the fire alarm going off. We look into the hallway to see what’s going on and see the laundry room next to her apartment has TONS of smoke coming out from underneath it. We ran back into her apartment and grabbed keys, phone, cat and dog, and then leave (hurriedly walking) to go outside. It was an electrical fire because the apartment refused to replace their really old machines and luckily was isolated to that one room.