There are different muscles in the forearm bro...some work across the wrist (flexor carpi radialis, flexor carpi ulnaris, extensor carpi radialis Longus and brevis, extensor carpi ulnaris, etc...). All those ones do is flex and extend the wrist.
Other muscles that begin on the humerus flex and extend the fingers...like the ones I mentioned earlier. So muscles in the forearm most definitely determine grip strength to a large degree...and when you train grip strength, you ARE training forearms mostly. Just watch your damn forarms when you grip...I'm sure you've noticed that when you train for grip your forearms get tired, right?