Barcelona has an excellent public transportation system with metro trains, buses, and trams, all easily accessible through a well-designed public transport network. The average cost of a single ticket is €2-€3, or better value is a T-10 ticket costing €10.20 for 10 journeys. Taxis are also available, but can be more expensive than public transport.
If you have more time, you can also consider visiting Montserrat to see the stunning mountains and monastery. On the other hand, if you have less time, you can skip one of the Gaudi buildings or beaches on day 4. Also, be prepared for crowds at the popular attractions, especially during peak season, and make sure to book tickets for key attractions in advance to skip the queues.