Did i have a possibility to win?

Well, from the get go you gotta get familiar with the Slav defense - Main line opening. 4.g3 is in my opinion a poor move since looking for fianchetto in King's side loses your tempo for gaining more space at the center as compensation for the virtual sacrifice of the c4 pawn. 4.Nc3 is stronger since it keeps building the pressure on d5 and often leads to 4...dxc4 which opens the d-line for white's center control in exchange of such pawn (Slav accepted). White could counter with several options such as
-5. a4. Alapin variation
-5. e3. Alekhine variation
-5. e4. Slav gambit.
See that in response, Black's line is similar to a Semi-Slav which blocks the development of it's white-line bishop and opens the Queen diagonal. I think that instead of looking for an early castle, you should further develop your queenside pieces (i.e. 5.Bg5 pins black's Knight and allows you to gain additional tempo if you still wanted to go for fianchetto). But again, I think that going for early castle and fianchetto on King's side as early is just going to give the initiative to Black....

Well, from the get go you gotta get familiar with the Slav defense - Main line opening. 4.g3 is in my opinion a poor move since looking for fianchetto in King's side loses your tempo for gaining more space at the center as compensation for the virtual sacrifice of the c4 pawn. 4.Nc3 is stronger since it keeps building the pressure on d5 and often leads to 4...dxc4 which opens the d-line for white's center control in exchange of such pawn (Slav accepted). White could counter with several options such as
-5. a4. Alapin variation
-5. e3. Alekhine variation
-5. e4. Slav gambit.
See that in response, Black's line is similar to a Semi-Slav which blocks the development of it's white-line bishop and opens the Queen diagonal. I think that instead of looking for an early castle, you should further develop your queenside pieces (i.e. 5.Bg5 pins black's Knight and allows you to gain additional tempo if you still wanted to go for fianchetto). But again, I think that going for early castle and fianchetto on King's side as early is just going to give the initiative to Black....
I have to study those openings and their theory... Thanks....