There are multiple ways of providing the locomotives for your layout, or for many, the display cabinet. Gauge O became popular amongst those who wanted to make their own by scratch building locomotives, as it was a size which was easier to make than the smaller gauges.
As the scale became popular and photo etching was found to be reasonably inexpensive, a range of locomotive kits were created by people interested in selling such kits to other modellers. As numbers of O gauge modellers increased, better detail was included using cast whitemetal parts, then lost wax brass castings, resin parts and more recently 3D printed parts. Now the range of loco kits available is extensive and covers all the major railways in the UK.
Latterly, ready to run locos have become popular. Initially locos could be professionally built from kits, followed by a range of custom made, small run, finished locos from Chinese and Korean manufacturers, and then low cost models from Dapol, Heljan, Minerva and others came onto the market.
As models and kits were released, the guild magazine, the Gazette, has published reviews of locos available for purchase.
Some guidance in locomotive construction is available as part of the guild manual.
You may want to find your next loco by the company name. For practical reasons this list will only cover foreign, BR and the big four!