Why is my move (g6) is a mistake in this game?

Thank you very much for helping me. Is computer analysis smart enough to consider exposing king's file as mistake? And is this the reason in my case?

It would be also helpful if you tell me that if you were in my place, what move would you choose to defend the bishop? Thanks

It would be also helpful if you tell me that if you were in my place, what move would you choose to defend the bishop? Thanks
i would play be6 because when you have the isolated pawn you generally want to avoid trading minor pieces.

You should just trade on d3. And the problem with g6? is not only your King position but your Pawns on the Kingside are vere weak after gxf5 (= they can't defend each other).

It would be also helpful if you tell me that if you were in my place, what move would you choose to defend the bishop? Thanks
i would play be6 because when you have the isolated pawn you generally want to avoid trading minor pieces.
I think you misread the board. There are no isolated pawns.

You should just trade on d3. And the problem with g6? is not only your King position but your Pawns on the Kingside are vere weak after gxf5 (= they can't defend each other).
Okay, it seems that there is no better way than trading on d3. Am I right?
In this game (I am black, the opponent is white and I won and the link is https://www.chess.com/game/live/5486042146) why the 10th move g6 is shown as a mistake in the analysis? (Link to analysis: https://www.chess.com/analysis/game/live/5486042146)
Here is a screenshot of the board and to recall you again the mistake is g6 and my question is why is that move a mistake?