An anvil cloud isn’t a stand-alone cloud, but more of a feature that forms at the top of a cumulonimbus cloud.
The anvil top of a cumulonimbus cloud is actually caused by it hitting the top of the stratosphere — the second layer of the atmosphere. Since this layer acts as a “cap” to convection (the cooler temperatures at its top discourage thunderstorms), the tops of storm clouds have nowhere to go but outward. Strong winds high up fan this cloud moisture (so high up that it takes the form of ice particles) out over great distances, which is why anvils can extend outward for hundreds of miles from the parent storm cloud.
Source: Means, Tiffany. “Clouds That Spell Severe Weather.” ThoughtCo, Aug. 1, 2021, thoughtco.com/clouds-that-spell-severe-weather-4089934.