I thought I was ahead but then I lost somehow. Not sure how.
What made you think that? This looks like a balanced game. White had a small lead but left a weakness at K6 in the endgame.
Here you go https://online-go.com/review/250387
Do you know where I can read up about attack and defense?
If you are into books, I highly recommend this one:
It should be easily approachable on your level.
I was looking for a link or something that I can just read and not buy anything
You could read this good (free) book if it’s not done yet : https://cdn.online-go.com/shape_up.pdf
Shapes are also important, but knowledge of good shapes is more intuitive and can be acquired naturally or by watching others game. Attack and defense is more subtle - where to play solid, where to play light, how to utilize influence, etc. It’s really hard to figure out those aspects out on your own.
I can only recommend saving some money and looking for the book. You might also find some second hand offer. Internet is full of junk knowledge and no amount of short articles or youtube videos of ‘go celebrities’ will replace a solid learning material from the position I recommended.