A way to get a text list of all the mountains/peaks on openstreetmap?

I’m new to this website. Can someone explain to me how to get access to the database of OSM and somehow filter everything out to acquire a list of every mountain peak?

Use Overpass with a query natural=peak and the out:csv option. You will need to read the Overpass QL manual on the wiki first & start with small areas first.

This will only give peaks that people have mapped, as OSM contains no topographic data.