Dear Feng Tianwen you can your various indices based on spectral reflectace of your targets such as NDVI, EVI, BRI and many more. You have to mask out the images within a threshold whihc may be suggested in literature.
The extraction is simple you can use band ratios for the visible to short wave infrared bands in Sentinel-2. More information on the extraction of these materials can be found in the following article which uses Landsat-8, but it can be applied to Sentinel-2. If more information is needed please contact me privately thank you.
Radiometric mapping and spectral based classification of rocks using remote sensing data analysis: The Precambrian basement complex, NW Nigeria, Remote Sensing Applications: Society and Environment, Volume 21, January 2021, 100447