Barcelona is one of my favourite cities. All the places mentioned above will be enough to keep you busy for a weekend.
Another place to look at is around the uni. Brew Dog have a bar in the area which is home to other less touristy bars and restaurants. It’s a couple of stops on the metro from Placa Catalunya.
The notes about security are valid. I’ve been loads of times and not had a problem. But, I have never carried a bag, wallet, camera, only taking some cash and a card with me. Be very aware of your surroundings and if it feels dodgy get out. My last trip there was in early 2019 and it was noticeably worse than previous trips.