Yes, Mold Earth is a transmutation cantrip in D&D 5e, which means that it does not need an available spell slot and that you can cast it anytime you want. You can find more information about it in Xanathar’s Guide to Everything on page 162. However, I suggest you read this article as it thoroughly explains how to use the cantrip as well as its uses.