If you want to know if your specific Mac can run OS X Lion or Mountain Lion, you can use our complete list of versions of macOS that a Mac can run. Also, the oldest OS an M1 Mac can run is Big Sur. You can't install an old OS on top of a newer one. Mountain Lion runs on the Macs below, but you may not be able to downgrade to it unless you completely reformat the drive.
Lion runs on Macs that came prior to the launch of Mountain Lion in 2012. Is my Mac compatible with OSX Lion and Mountain Lion? Apple stopped charging for macOS updates with Mac OS X 10.9 Mavericks. Strangely, Apple still sells Lion and Mountain Lion for $19.99 each. To get Lion and Mountain Lion for free, you can visit the support documents for those OSes on Apple's website: But there's good news: Apple is now offering Lion and Mountain Lion for free for anyone who wants them.
Some people are still using OS X 10.7 Lion and OS X 10.8 Mountain Lion, and until recently, you had to pay Apple $19.99 to get download codes for those OSes. While macOS is currently on version 11 (otherwise known as Big Sur) and macOS 12 Monterey is coming later this year, there are plenty of folks who use old versions of the Mac operating system.