Barcelona has a well-connected public transportation system, including buses, metro, and trains. You can use the integrated ticket called "Hola BCN" for unlimited travel for up to 5 days. It costs €16.90 for 2 days and €24.50 for 5 days. Taxis can be hired from the airport to the city center with a fare of €30-35. Trains to Montserrat can be taken from Plaça d'Espanya and cost €8.50 one way.
If you have more time, consider visiting other attractions such as the Picasso Museum, Tibidabo Amusement Park, and the Magic Fountain of Montjuïc. If you have less time, you can skip Montserrat and spend more time in the city visiting the famous Camp Nou stadium, the Aquarium, and the Ciutat Vella district. To save money, you can visit the attractions for free on the first Sunday of every month. However, expect heavy crowds on these days.