Both are okay, but they might or might not mean something different depending on how you look at it.
Generally, "Whenever X, Y" means that X happened/happens/is supposed to happen many times, and each and every time Y also happens (or in this case, you're told to make it happen). So your sentence would read as a general rule - "you'll have many chances to hold onto happiness in your life, and each time that happens, make sure to do so".
"When X, Y" can mean a single occurence - X happened/will happen, and Y happened/will happen at the same time. So you'd rather say "...when you get the chance" if there's a particular chance to be had - for example, you know your friend is getting a new job, and he's being anxious for it, so you're telling him to hold onto that once he gets the chance (and that job). Compare "When you get that job, you'll be out of trouble" vs (technically grammatical, but making no sense). !"Whenever you get that job, you'll be out of trouble"
Now, what @Man_From_India said also holds - if the context or grammar already estabilishes that you're talking about a repeating occurence, you can use "when" in place of "whenever". For example, "Check your locks when you leave your house" can be placed in a health and safety guide, and it would mean the same as "...whenever you leave...".
This is why is to explains a reason.
This is how is to explains a process.
I had three rounds of tough intervews for this job, that is how I got hired.
During one of the interview, I nailed a difficult problem, that is why i got hired.
for your example, it should be
Speaker B: Is this why you know so much about these topics?
Best Answer
You can ...
and...also
What looked somewhat strange is "you went to the internet!'
Do you mean that you went to the cyber cafe?
Internet is not a physical shop here, so 'went to' in this context does not sound proper to me. Even if it's used, I'd go for a better option.
Common use is..