What to do in the Middle Game
This is a guide on what to do in the middle game if you are stuckHello everyone! Today, I am here to tell you about what you should do in the middlegame. Most people do not know what to do in the middle game. They know that they have to control the center, develop, but what for? They would not know what to do. Though I am not high-rated myself, I do know plans and strategies for the middlegame. Let us take a look at some positions and what you should do.

P.S: Credits to my IRL brother for making the piece set I used
In the position given above, both sides have castled in opposite directions. This leads to a more aggressive game. Why? Because both sides can launch a pawn storm to the opponent's king to attack it without worrying about their own king safety.
In this position, I would play g4 because it attacks the king, and on the next move, I could be able to play g5. It attacks the knight, and we can go h4 h5 in the near future. We should also bring our pieces into play, attacking the king, and just enough to defend our own. If we do not defend our own king, and we go all in for the attack, we might end up losing because our opponent can have some counter play. In such positions, our opponent would want to attack our king as well.
Another good tip is that when you launch your pawn storms into the enemy's king, if you can push the pawn with a tempo, then that is most likely best. For example, in the position given above, black could play a6, to prepare b5 which gains a tempo, and right after that, b4, which gains another tempo.
In most cases, we only need to defend the king a little. We need to focus on the attack on the opponent's king.
Note: The game given above is just an example game. There are better moves than the moves I mentioned but I used it as an example to show you the idea.
Now, let's look at another game where black fianchettos their bishop.

In the given position, white can play Qd2, which prepares Bh6. But first, it is better to play h3 because if we play Qd2 directly, black can go Ng4. The purpose of Bh6 is that if Bxh6, then Qxh6 and we can go, (in some positions) Ng5 which would threaten checkmate on h7 (Not in this position, because there is a knight of f6.) Another purpose of this move? It gives us the option (in the future) to castle short or long. Why would this really matter? Because you can decide later on whether to castle kingside or queenside according to how your opponent plays.
If we have a strong attack going with our pieces, then it is mostly better to castle opposite to your opponent because then you can keep the attack going with your pawns now and black has to either defend or start their attack.
Note: Again, just the main plan, not pixel perfect play.
There is also a tactic you can use, and that is to break open the fianchetto structure with h4 h5. If they ignore it, we can push again, threatening the bishop, and controlling the g7 square.
Now, we talked about what to do if the opponent castles in the opposite direction. What if they castle in the same direction? Let's figure this out together.

In this position, white can develop their remaining pieces, seize the center, etc. For now, we will seize the center. So, we could go d4. If exd4 cxd4, now the c3 square for our knight is vacated. After that, we can develop our pieces with Nc3, Be3/Bg5, etc. If they don't take, we can simply develop our pieces.
Now, I want to talk about why we should control the center. If we have complete control of the center, first off, we have more space, which crams the opponent and they have to somehow fight for the center or just defend. They will be way too passive if you can completely control the center without them having a chance to fight for it. Secondly, we can develop our pieces easily, and they are more mobile, while our opponent cannot. And we can launch an attack on their king.
Now, I want to talk about why we should develop our pieces. If we have lots of our pieces developed compared to our opponent's, first off, again, we have more space. Secondly, we can launch an attack with our pieces. One example is the bishop-queen fianchetto counter I showed you earlier. Try to launch an attack on the opponent's king, almost always.
Now, what if we cannot attack the king? What if it is defended too well and we are castled on the same side? Prepare for the endgame.
Find weaknesses. These can be double pawns, isolated pawns, etc. If you can't, then make those weaknesses. How? Let's see an example.

In this position, is there a weakness? No. Can we create one? Yes. Bxa6 is the right move (in this position.) Because they have to take the bishop back (or else they just lost a piece) and after that, they have doubled isolated pawns.
A mistake a lot of people make is taking pieces with no reason. This is a fatal error as in some positions it doesn't help you, but it can help your opponent.
Let us look at an example of what would happen if you took something with no reason whatsoever.

In this position, is it good to take? As we mentioned before, taking without a reason is not good. You should not take here, because it does nothing except let your opponent develop freely (if exf6, then Nxf6), and give up some of your control over the center. Instead, just develop your pieces. Nf3 protects the pawn, or Bb5 pins the knight, etc. These are all good moves and, in this example, taking doesn't really matter that much, but for other positions you might reach, do not take with no reason.
Note: The moves mentioned may not be the best move, but it is there to give you an idea.
If you didn't feel like I was correct on any part of this, feel free to tell me in the comments!
And this concludes our lesson! Feel free to re-read it if you'd like! And I hope you learned a thing or two from this! Bye!
