The Mold Earth cantrip is defined in XGE on p.162. As defined, this becomes an over-powered spell capable of completely transforming the local landscape. Since it is a cantrip, it doesn't use a spell slot and thus can be used indefinately. The following interpretation puts some bounds on this, including exhaustion if used over long periods of time.
If a mage chooses to use Mold/Move Earth, only a cubic five feet of earth can be moved at a time. Earth cannot be levitated - it must move over existing earth. It will move dirt, dust, earth, gravel, and rocks up to 10lbs in weight. Every 10 rounds, the caster must make a DC-12 CON roll. On failure, one exhaustion point is earned. A long rest (plus food and drink) is needed to remove one level of exhaustion.
Alternatively, the mage may clear one 5' cube per minute and not have to worry about exhausting since some resting is built in.
Note that the dirt has to go somewhere. It can be piled up, but becomes unstable over ten feet. Rocks (etc) over 10lbs will impede digging. It is possible to excavate under large stones, trees, etc. but the large object will fall (eventually) into the hole created. For game purposes, hard packed earth, hard pan, clay, etc. is treated like rock and cannot be shifted.