Yes, cheetahs do compete with lions. Cheetahs can share the same habitat with lions; however, they actively avoid lions (and also hyenas and leopards). They are smaller carnivores/predators than their competitors and they are non-confrontational in nature. They would avoid unnecessary injuries at all costs because they rely on speed to hunt and survive. An injury that can slow them down is potentially life threatening.
Cheetahs have been reported to suffer from intraguild competition by lions Panthera leo, spotted hyenas Crocuta crocuta and occasionally leopards Panthera pardus. These larger predators represent a threat to the smaller-bodied cheetahs as they can affect their food intake by limiting access to high resource areas or kleptoparasitism (e.g. 10–12% of kills are kleptoparasitized in Serengeti National Park (SNP)), and reduce population sizes via increased cub mortality (e.g. 73% of cub mortality was due to predation in the SNP). In response, cheetahs often demonstrate avoidance behavior to minimize interactions with dominant carnivores , with spatial and temporal partitioning regarded as the principal behavioral mechanisms by which this is achieved. Accordingly, cheetahs have been described as a refugial species that seeks competition refuges within the landscape with low densities of lions and spotted hyenas.
Rostro-García S, Kamler JF, Hunter LT. To kill, stay or flee: the effects of lions and landscape factors on habitat and kill site selection of cheetahs in South Africa. PLoS One. 2015;10(2):e0117743. Published 2015 Feb 18. doi:10.1371/journal.pone.0117743
(removed the citations)
The definition of the terms used in the above citation:
- Intraguild predation, or IGP, is the killing and sometimes eating of a potential competitor of a different species. This interaction represents a combination of predation and competition, because both species rely on the same prey resources and also benefit from preying upon one another. - Wikipedia
- Kleptoparasitism, literally meaning parasitism by theft, is a form of resource acquisition where one animal takes resources from another. Although kleptoparasitism of food (i.e., kleptoparasitic foraging) is the best known example, the stolen resources may be food or another resource such as nesting materials. - Sciencedirect.com
One of the prey species that cheetahs and lions both eat is Thomson's gazelle (Eudorcas thomsonii). Thomson's gazelle is the primary prey of cheetahs. Probably, the most amount of overlap in their diet comes from eating this prey. However, lions would hunt them less or just steal them from cheetahs.
The prey species included buffalo (Syncerus caffer), wildebeest (Connochaetes taurinus), and Thomson's gazelle (Eudorcas thomsonii) as the three main prey species of Serengeti lions, hyenas, and cheetahs, respectively (Schaller, 1972; Sinclair & Norton‐Griffiths, 1979).
Swanson A, Arnold T, Kosmala M, Forester J, Packer C. In the absence of a "landscape of fear": How lions, hyenas, and cheetahs coexist. Ecol Evol. 2016;6(23):8534-8545. Published 2016 Nov 6. doi:10.1002/ece3.2569
The same paper (cited above) talks about the coexistence of lions, hyenas and cheetahs in Serengeti National Park, Tanzania and provides analysis on the avoidance behavior among the predators. It has the conclusion that despite cheetahs avoid lions, they are not displaced from their habitats and they don't lose access to their prey. In contrast, African wild dogs are displaced from their habitats by lions.