Final answer:
The step that must occur directly before the formation of sedimentary rocks is the weathering and erosion of pre-existing rocks, which produces the sediment necessary for sedimentary rock formation through the processes of compaction and cementation.
Step-by-step explanation:
The step that always has to be directly before sedimentary rocks in order for them to form is weathering and erosion of pre-existing rocks, which creates sediment.
Sedimentary rocks form from the compaction and cementation of these sediments. The process begins with weathering and erosion, where rocks are broken down into smaller pieces. These sediments are transported by water, wind, or ice and eventually deposited in layers. Over time, additional layers build up, applying pressure to the sediments beneath. This process, known as compaction, squeezes the sediment grains closer together.
Concurrently, water that moves through the sediment deposits minerals in the spaces between grains, which acts as a glue in the cementation process, eventually lithifying the sediment into sedimentary rock.