Select some often used resources and bookmark the links:
The reference pages for the used language (e.g.
cppreference.com[
^] or
Reference - C++ Reference[
^] for C/C++).
The reference pages for used APIs (Application Program Interfaces) and third party DLLs. Like MSDN with Windows, or Qt. When using Visual Studio, you already have quick references by pressing F1 when on an API function.
These reference pages usually provide example code which should be sufficient to answer most questions. If not, try to search the web. If that does not help, ask here or elsewhere. Last resort is contacting product support or authors of used source code.
When beginning with something new, start looking for tutorials or introductions about the topic.
As already mentioned by others, searching the web and asking is a skill. The useability of search results is related to good matching search terms and the quality of answers is related to the quality of your questions.
For questions here at CP there is a FAQ:
Code Project Quick Answers FAQ[
^].