Can someone analyze the positional play in this game?

Playing 13. d5 because it will be good if he takes is hope chess. You didn't even analyze e5, threatening to turn your light square bishop into a perma pawn. You'd be strategically lost if black could get his knight to c5 before you can sack the cpawn. Nor does black need to play e5, since white playing dxe6 is no threat. 13. d5 was a significant strategic error that you didn't analyze enough -- this is the kind of transformational pawn move that entirely changes the position.

Playing 13. d5 because it will be good if he takes is hope chess. You didn't even analyze e5, threatening to turn your light square bishop into a perma pawn. You'd be strategically lost if black could get his knight to c5 before you can sack the cpawn. Nor does black need to play e5, since white playing dxe6 is no threat. 13. d5 was a significant strategic error that you didn't analyze enough -- this is the kind of transformational pawn move that entirely changes the position.
How should I continue with this position. I see why d5 is a mistake as it locks down both my bishops after he moves e5. Would c5 be better? And yeah, I am opening a good square for his knight, but rly what should I have played here? Or more general, should I stay defensive here and castle? (computer suggest castling), or should i find a way to attack and open up the position.

If black plays ...h6 and ...g5 at an early stage, white will often try to exploit the weakened kingside. A common idea that works well here (after 12... Bb7) is to play h4 (persuading ...g4), Nh2, then f3, forcing open the f-file.
13. O-O is part of the plan, as you need a rook on the f-file. But you might be wondering: why not 13. h4 immediately?
With a white knight on f3, black can’t play 13. O-O Nc6 because of 14. c5! dxc5 15. Bb5, when 16. Ne5 is coming next. Black doesn’t have a reasonable developing move other than 13... Nc6, which is good news for white.
In comparison, 13. h4 is somehow rash, allowing the black king’s escape to safety: 13... g4 14. Nh2 Nc6 15. f3 O-O-O when black’s position is playable.
Castling isn't really staying defensive, its just getting things in order before you open up the position. With the two bishops and black's king more or less trapped in the center, you are going to want to open things up, and your king's greater safety than his will be an advantage. As far as *how* to open things up, E4 doesn't work right now, but it might later depending on how things goes. Or even f4 in some positions. C5 is an option immediately or after castling, a pawn sac to open things up. But I like 0-0 because what is the rush? What is black's strategy here? G4 does nothing scary, and his nh5 is probably coming regardless. And I think white is going to want to castle in this position at some point. Staying in the middle is sometimes an option for white, but with the two bishops we want to open things up. So, for example, h4 to provoke black to further weaken his pawns isn't especially appealing. So that is the logic for 0-0 -- get it done, for king safety and to link the rooks and wait and see what black does before deciding how to open the position.

I don’t think d4-d5 was good since you had a huge center and then give it away hoping your opponent makes a mistake. It worked out this time but what about next time?

If black plays ...h6 and ...g5 at an early stage, white will often try to exploit the weakened kingside. A common idea that works well here (after 12... Bb7) is to play h4 (persuading ...g4), Nh2, then f3, forcing open the f-file.
13. O-O is part of the plan, as you need a rook on the f-file. But you might be wondering: why not 13. h4 immediately?
With a white knight on f3, black can’t play 13. O-O Nc6 because of 14. c5! dxc5 15. Bb5, when 16. Ne5 is coming next. Black doesn’t have a reasonable developing move other than 13... Nc6, which is good news for white.
In comparison, 13. h4 is somehow rash, allowing the black king’s escape to safety: 13... g4 14. Nh2 Nc6 15. f3 O-O-O when black’s position is playable.
Im not entirely sure if I understood it correctly. You say that h4 is bad if he hasn't moved Nc6 yet, because I need the knight on f3 to put pressure. Otherwise he will be fine. And since his only development-move is Nc6 I should castle and wait for him to move Nc6? After 14. c5! dxc5 15. Bb5, 16. Ne5. i should move h4 to open up the position. Is this correct? (Thank you for explanation though)

Castling isn't really staying defensive, its just getting things in order before you open up the position. With the two bishops and black's king more or less trapped in the center, you are going to want to open things up, and your king's greater safety than his will be an advantage. As far as *how* to open things up, E4 doesn't work right now, but it might later depending on how things goes. Or even f4 in some positions. C5 is an option immediately or after castling, a pawn sac to open things up. But I like 0-0 because what is the rush? What is black's strategy here? G4 does nothing scary, and his nh5 is probably coming regardless. And I think white is going to want to castle in this position at some point. Staying in the middle is sometimes an option for white, but with the two bishops we want to open things up. So, for example, h4 to provoke black to further weaken his pawns isn't especially appealing. So that is the logic for 0-0 -- get it done, for king safety and to link the rooks and wait and see what black does before deciding how to open the position.
Thank you for the explanation that I was aiming to get. I want to learn about the thought processes in different positions. How to react, what mindset to have etc.

I don’t think d4-d5 was good since you had a huge center and then give it away hoping your opponent makes a mistake. It worked out this time but what about next time?
I actually didn't "hope" that my opponent would take exd5. I explained that why it also would be good if he didn't take but just moved e4. (I was not right and I was missing important stuff, but that's another case )