It's not either or, it's a dance. You make a hypothesis in your head, verify it with a compiler. If result matches your hypothesis, move on. If not, investigate.
For me personally, I thought I kinda knew assembly until I started using https://godbolt.org when I realized that I really didn't know assembly. This site helped a lot of other people as well. Note that all it does is make the process of discovery faster. But it's a tool in the same category as a calculator.