It's DM fiat
Since there is nothing specific about being next to a fire, other than for telling stories, in the PHB or DMG, we would normally consult spell that have similar effects.
The first example would be Wall of Fire:
You create a wall of fire on a solid surface within range...
When the wall appears, each creature within its area must make a Dexterity saving throw. On a failed save, a creature takes 5d8 fire damage, or half as much damage on a successful save.
One side of the wall, selected by you when you cast this spell, deals 5d8 fire damage to each creature that ends its turn within 10 feet of that side or inside the wall.
So it's a big fire anything on the hot side takes damage. Well, this isn't magical, so there would be no "not hot" side. But it gives a space of 10ft to take damage.
Next up is Flaming Sphere:
A 5-foot-diameter sphere of fire appears in an unoccupied space of your choice within range and lasts for the duration. Any creature that ends its turn within 5 feet of the sphere must make a Dexterity saving throw. The creature takes 2d6 fire damage on a failed save, or half as much damage on a successful one.
So now it's anyone within 5ft of the source. A little more realistic in that heat goes everywhere. That should be the answer, right? Not quite. There is also a cantrip called Create Bonfire:
You create a bonfire on ground that you can see within range. Until the spell ends, the magic bonfire fills a 5-foot cube. Any creature in the bonfire's space when you cast the spell must succeed on a Dexterity saving throw or take 1d8 fire damage.
The bonfire ignites flammable objects in its area that aren't being worn or carried.
So a bonfire only damages people and object in its own space and doesn't do any damage to the squares next to it.
So it could be anything from 10ft to 5ft to it doesn't matter. It depends on how the DM sees the fire raging.
Then you can add on heat exhaustion rules...