What you use is what the pump maker says to use....That said, you don't have to buy his overpriced oil, just the equivalent if available. Oils are classed by first type, then viscosity, then additional properties applicable to the application and actual materials and design clearances the pump is constructed of/to.....I've maintained many compressors that required 10 weight mineral oils. Some that required multi viscosity fossil based or syn oils, some fixed weight syns or organics, and each with or without detergents, and some no oil at all.
For over 50 years, the most popular consumer grade single phase AC compressors that delivers 100 PSI at 20 CFM or less, tends to require 30 Weight ND fossil oil or equivalent syn after breakin.
But if you decide you want an industrial grade 100 PSI 20 CFM 3 phase unit in your plant, then expect it may require a more exotic oil because the materials used in the bearings and the designed clearances are usually much different than consumer grade pumps of same ratings, but even then the more exotic oil is usually available from several sources.
I used 100 PSI 20 CFM only because that capacity compressor is most popular with both industry and consumers, just to point out that each in that class will often require very different oils, and both are usually available from many different suppliers at bargain prices.
One you move beyond that 100PSI 20 CFM range, you can get into very specialized equipment where they don't build their compressors to accept popular oils, instead they build their compressors to do a particular job, and then formulate a very specific oil to keep it going where you better fersure buy that exact oil at their price.