Why is it a mistake to trap this bishop? In the below position, I played pawn from g7 to g5, trapping the white bishop. The computer didn't like that at all, and gives white a huge advantage. Instead, it wanted me to just simply develop my light-squared bishop.

What is wrong with my move?
You get a bishop in exchange two pawns and initiative for white piece.

This is the explanation: After you go to g5, your opponent can play knight takes g5 and if you recapture the knight with your pawn, queen opponent will go to h5 and it is a check. Your pawn on g5 will be captured in the next move by your opponent queen.
Black position is vulnerable and d5 pawn is the weakness that can be exploited by white.