So, let’s define “science” right up top.
There are two parts to this “study,” which even the Dutch neuroscientist Jacob Joji acknowledges that musical tastes being “highly personal” kind of makes this inherently unscientific. Step one was UK-based electronica band Alba surveying English and Irish citizens about the songs that made them happy, compiling popular answers, and then handing the songs off to Jacob Joji to study.
What Joji found is that most of the songs had three basic things in common. One, they are often at 140 to 150 beats per minute. Two, they are (mostly) recorded in major keys instead of minor keys. Three, the lyrics are (mostly) about positive events in some form.
You can read more about the study here, but the results are some pretty classic songs (#9 is a song I listen to cheer myself up, no joke):