Beaches have been around since the oceans formed about 4 billion years ago Flobadob. Beaches are generally formed from whichever material is endemic to a particular area.
The golden sandy beaches in the UK are mostly formed from eroded quartz, flint and other minerals that comprise the rocks of our shores. The brilliant white sandy beaches common in the Pacific atolls and other areas of the tropics are formed from broken shells and eroded coral from the local reef. Volcanic islands usually have black sand beaches which is eroded basalt. I visited Iceland many years ago where all the beaches are black. The first time I walked on a beach I remember being especially struck by the sight of the white surf creaming up the black sand beach. Other volcanic islands have black sand too, such as Hawaii.