I made a few squirrel stews in Fallout 4 which have the effect that I receive an extra 2% of experience for 2 hours. So when I eat 4 of them do I get 8% for the next 2 hours, 2% for the next 8 hours or still the base value?
Yes and no.
In your case, consuming multiple squirrel stews will only increase your experience gain by 2%.
In order for effects to stack, you need to consume items of different kinds. For instance, if you consume 2 different kinds of alcohol, the second one will override the effects of the first one. However, if you consume a strength enhancing alcohol like Whiskey, and a strength enhancing chem like Buffout, the effects will stack. In that case, you would gain +4 strength instead of only +2.
In other words: you'll need to consume something else along with your squirrel stew, if you want to increase your experience gain by more than 2%.