We visited both Parc guell land Sagrada Familia on the same day-- Pre-Covid. We did PG in the AM, because of the heat issues.
We booked Parc Guell /tickets for 10:00am. Did their guided tour and then walked around the park to the mirador de Consol until Noon. We had a sandwich lunch at Guelly Sandwich Park. There was no seating inside, so had to eat outside on some concrete benches.
We then walked down the Baixada de la Gloria. (You don't want to walk UP this, even though they have escalators)
to Vallcaraca Metro station.
we took the metro to Sagrada Familia Metro Station.
(If you are a public transit virgin or public transit adverse, you can do a long walk or take a taxi)
Lots of places to eat around around Sagrada Familia.
We had Sagrade Familia Tickets for 2:30 pm. and had time to spare. We rested in the park across from the church and used the time to take pictures of the outside.
So that timing worked for us: Parc Guell 10:00am./ Sagrada Familia 2:30 pm
You will need to purchase tickets in advance for both places. July is a major tourist time and you cannot wing this.
If you think you can just show up and buy tickets to either place, you will be disappointed.