The hole for "the simplest of pit traps" consists of "a 10-foot-deep hole" in the ground (Xanathar's Guide to Everything p.114, and Dungeon Master's Guide p.122) because "at the end of a fall, you take 1d6 bludgeoning damage for every 10 feet you fell" (XGtE p.77, and Player's Handbook p.183).
Assuming the ground in question meets the requirements for "loose earth" (but isn't so loose it immediately subsides back into the hole), as an Action the mold earth cantrip can dig a 5-foot-deep hole:
You choose a portion of dirt or stone that you can see within range and that fits within a 5-foot cube. You manipulate it in one of the following ways:
- If you target an area of loose earth, you can instantaneously excavate it, move it along the ground, and deposit it up to 5 feet away. ...
Can you dig a 10-foot-deep hole in two actions with two castings of mold earth, or does the depth matter when you try to excavate the second 5-foot cube so you would need to dig an extra step first to move it to?