Richard Trevithick demonstrated for the public the world’s first railway locomotive on 21st February 1802.
Wikipedia has this to say about the event.
In 1802 Trevithick built one of his high pressure steam engines to drive an automatic hammer at the Penydarren iron works near Merthyr Tydfil in South Wales. With the assistance of Rees Jones, an employee of the iron works and under the supervision of Samuel Homfray, the proprietor, he mounted the engine on wheels and turned it into a locomotive. In 1803 Trevithick sold the patents for his locomotives to Samuel Homfray.
Homfray was so impressed with Trevithick’s locomotive that he made a bet with another ironmaster, Richard Crawshay, for 500 guineas that Trevithick’s steam locomotive could haul 10 tons of iron along the Merthyr Tydfil Tramroad from Penydarren to Abercynon, a distance of 9.75 miles (16 km). Amid great interest from the public, on 21 February 1804 it successfully carried 10 tons of iron, 5 wagons and 70 men the full distance in 4 hours and 5 minutes, an average speed of nearly 5 mph. As well as Homfray, Crawshay and the passengers, other witnesses included Mr. Giddy, a respected patron of Trevithick and an ‘engineer from the Government’. The engineer from the Government was probably a safety inspector and particularly interested in the boiler’s ability to withstand high steam pressures.