middle game help

In the middlegame it's important to have some claim to the center, that way your pieces can freely maneuver to either side for attack or defense. The middlegame is not about playing in the center all the time. Many positions your only goal is to open lines on one flank or the other. The typical example would be e.g. an advanced french structure:
White's natural play is on the kingside because that's where he has a space advantage. The lead pawn of his main pawn chain (the e pawn) is on the kingside. For black, this is the d pawn, and black seeks play on the queenside.
---
Now to your game
Your furthest advanced pawns are on the queenside. Your center pawns are actually pretty nice. They deny central squares without giving white an obvious pawn break (earlier in the game white needed to play the d4 pawn break or try to push the f pawn for example) but now that white's waited so long, it's a lot harder for him.
Black though can start thinking of moves like c4 or b4 right away. 17...c4 would be natural. Play 17...c4 and the engine likes it a lot too.
---
Sometimes it's hard to guess why the engine picks certain moves. Here I think it has to do with the odd way black has placed his bishops. Notice bishops on the queenside point... at the kingside. Your pawns are telling you to play on the queenside, but your bishops are blocking the queenside files and also pointing the wrong way. I would play 17...a5 myself in hopes of getting to play 18...a4 with Ba5 and Ba6 for example. This gets the bishops out of the way (they were clogging the c and b files) and puts them on better diagonals.
The engine line you were asking about 17...a5 18.a4 b4 is also good for black of course. It gains space and a potential target on a4 and black will play a pawn break later. Meanwhile white still has his main problem which is no clear pawn break in the center because he waited too long during the first part of the game. This is a slower way to play, so it's harder to explain, but that's basically what's going on here... black has obvious play on the queenside due to a space advantage while white has no pawn break and play of his own.
Oh, and h6 is probably completely unnecessary (engines aren't always right).
But for example, it may be a prep move for the tactic Ng5 followed by Nxe6 fxe6 Bxe6 which forks your king and rook on c8. You said it wants to play h6 starting on move 13, and move 12 is when you moved your rook to c8, so maybe that's it.