The rock made of grains of sand is called sandstone.
Sandstone is a sedimentary rock formed by the cementation of sand grains. These sand grains are typically made of quartz, feldspar, or other minerals, and are cemented together by minerals like calcite, silica, or iron oxide.