Trying to install Tool chain for C++ normally as mentioned here:
https://www.msys2.org/
https://code.visualstudio.com/docs/cpp/config-mingw
You might face package issues for MSYS2
with the following message:
ssl certificate problem: self-signed certificate in certificate chain
after so many trials, the issue was related to:
pacman's SSL agent
as mentioned here:
Then you might need to do multiple update trials