The claim that eating chocolate relieves stress is partly true, but the effect is small and depends on the type and amount of chocolate you eat. According to a study from the National Institute of Health people who ate 40 grams of dark or milk chocolate every day for two weeks showed lower stress levels, especially among women. It also showed in this study that the higher levels of cacao that were present in the chocolate, the lower stress levels people were experiencing. So that means eating white chocolate is going to have a lower effect on your stress compared to eating heavily concentrated cacao chocolate.
Another NIH supported study found that eating dark chocolate for four weeks reduced the body’s main stress hormone, cortisol, even though people’s moods didn’t change much. This study also found that in other studies, that results weren't super consistent with the lower cortisol levels that they found. Even thought cortisol levels were lower on this study, it couldn't be that consistent over many studies
Finally, I investigated a Johns Hopkins study that explored people's individual relationships with chocolate. With their findings, they stated that people who ate dark chocolate felt physically less stressed, and researchers even confirmed it by confirming that their cortisol levels were lower as well. The article also stated that chocolates with above a 70% cacao level showed to have more health benefits compared to chocolate lower than that level.
Overall, eating dark chocolate in specific can help you relax for a little while, but science shows it’s not a reliable or lasting solution for managing stress.