The answer to this question is not definitive, as there are a number of variables that can affect the length of time a star spends on the main sequence. However, generally speaking, stars with higher masses tend to spend less time on the main sequence than those with lower masses. This is because high-mass stars burn through their fuel much faster than low-mass stars, and thus have shorter lifespans overall. Additionally, metal-rich stars (those with higher abundances of heavy elements) also tend to spend less time on the main sequence than metal-poor stars. This is due to the fact that heavier elements are more efficient at absorbing and radiate energy, which causes them to burn through their fuel at a faster rate.
There are a few exceptions to these general trends. For example, red dwarf stars (low-massstars that are relatively cool and dim) can actually spend billions of years on the main sequence before running out of fuel and evolving into giant or white dwarf stages. Similarly, some high-mass blue giants can also extend their main sequence lifetimes by fusing heavier elements in their cores (a process known as "core hydrogen burning"). However, in general, it is safe to say that lower mass stars will spend more time on the main sequence than higher mass ones.