The main catagories in O are:
O gauge - various scales, but generally close to 1/64 or close to 1/48 usually operated on tubular track. Track is 5-ft gauge, Lionel, MTH, 3rd-Rail (recently bought by Atlas)
O scale (3-rail) 1/48 scale, usually operated on T-rail track. Track is 5-ft gauge, Atlas, Weaver, Williams, Lionel, MTH, K-Line (now gone with some items marketed by Lionel)
O scale (2-rail) 1/48 scale, 2-rail T-rail track, Track is 5-ft gauge, Atlas, Weaver, Williams, some K-Line (I don’t know if Lionel is selling any of their 2-rail), some MTH (but not recently- correction just found out MTH still offers some of their locos in 2-rail-), small specialty companies (usually kits), various Brass manufactures/importers, detail parts
Proto48 1/48 scale, 2-rail T-rail track, Track is 4’ 8-1/2" gauge. Usually built to finer standards than O scale. small specialty companies (usually kits), detail parts and conversion parts.
Q scale, uses O gauge track (usually T-rail) but porportioned so the gauge is the correct 4’ 8-1/2"
There is a lot of overlap in products between the catagories with modelers doing conversions between them.