Detrital sedimentary rocks form through compaction or cement…