This sounds both facetious and really obvious but I recommend it quite seriously (and it won’t be any kind of secret to people who work permanently in programming or web development). There is definitely a knack to targeted Googling too. For those of us who usually use Google to solve trivia debates, it’s a different kettle of fish using one search bar to explain and elicit a useful response to why you think you just broke an entire web-page and/or visualisation.
The other troublesome step is interpreting the hits you get back. The results are inevitably forum after forum after comment thread after forum, but somewhere in there will be a response to exactly your problem and the piece of correct code you need. I learned to read more than the first page of hits, look at all of the forums and try all of the solutions. I wish there was a more polite way of saying ‘trial and error’ but implementing the solution is just that: you have to get used to persevering and somewhat blindly plugging pieces of code in that maaay be right (though you’re not sure why).
The last point/caveat is this: unfortunately, knowing all of this still doesn’t mean that I can fix my own problems every time (that’s a whole different story) but knowing what’s wrong, using the right terminology and feeling comfortable being a little bit blind is a significant start to getting the answer you need.