“Ashes” cool pretty quickly. When there’s nothing left in the ash to support combustion, then the fire goes out, out completely, and the ashes cool relatively quickly. The problem with most fireplace ash is that it’s covering a lot of hot coals (think of charcoal briquettes in a grill covered by fine ash). And those coals are still combusting; still burning, even though covered with ash.
So stir your ashes, and if they are really “ash” with no lumps at all (the lumps may still be hot for quite a few hours), and if you can hold your hand over the stirred ashes and not feel any more heat, then they’re probably cool enough.
I always used to stir my ashes twice and wait a full day. I’d put them in a steel bucket that I kept outside on a cement patio. And after a day outside they were good to go.