Having a goal in chess motivates us, everybody is unique, and so are their goals.

Today I will give some tips and let’s start.
My analysis:
You are not careful with threats and choosing moves. You should consider your own threats or plan every single move and also seek your opponent with open wide eyes.
I’d like to assume 4…e5 was misclick. And afterwards, your opponent played terribly and almost gave everything for free. But they did not lose hope and created a checkmate threat. On 25… move any move protecting c7 square could have worked. Being greedy ended the game.
Openings:
You can start learning simple openings. There are a lot of sources on chess.com, lichess or youtube. And if you come across an opening you don’t know just use these three steps:
- Capture the center
- Develop pieces quickly
- Castle
Middlegame
Create threats to your opponent and prevent their ideas. Be careful when you choose move. Every move should be done wisely.
Endgame:
Start learning simple endgames like pawn endgames etc. You can solid what you learn via puzzles.