Sedimentary rocks are the product of 1) weathering of preexisting rocks, 2) transport of the weathering products, 3) deposition of the material, followed by 4) compaction, and 5) cementation of the sediment to form a rock. The latter two steps are called lithification.
I hope this helps♀️