1712: Newcomen's steam engine.
1765: Watt's first engine.
1800: First battery.
1804: First steam locomotive.
1832: First DC generator.
The book (https://archive.org/details/ahistorycoalmin00gallgoog/page/n...) referenced by wikipedia claims that the change from wood to coal for domestic use occurred during the reign of the first Elizabeth.
(The Cornish steam engines also come up a lot due to them doing a lot of improvements that Watt held back with patent shenanigans, and a collaborative approach to their improvements)
Before electricity was a thing the steam engines were also used to pump water which then ran machinery hydraulicly, like cranes. Which piggybacked on improvements in civic water supplies.
https://en.m.wikipedia.org/wiki/William_Armstrong,_1st_Baron...
(Same guy had the first house lit by hydroelectric power later)
My point is that this sort of transition isn't immediate and universal. Some people had the motivation and opportunity to use coal, there were lots of advantages and it spread... slowly... at the same time the infrastructure to extract and distribute it developed.
It was known and used, just that there wasn't enough incentive for massive extraction so it wasn't searched. It's population growth and in conjonction with it urbanisation, electrification and railroads that lead to the search of more efficient energy source.
Nothing really prevented people from using coal earlier and they did but keep in mind that town where smaller and people scattered about in lots of smal villages. It was easier to collect wood.
Remember that by the end of 18h century, only a handful of cities barely reach a million inhabitant.