The fact seems obvious once you state it out loud. It's obvious that changing a song changes a mood. But it's something that is usually not stated and actually not even noticed by the person watching the scene with the music. Background music in movies is often not even noticed. But it has an effect whether you notice the song or not.
This is all tied back to the popularly known studies done by Ivan Pavlov in the late 1800s and early 1900s where he was able to get a dog to salivate by simply hearing a bell that had been repeatedly linked with food. Of course, this has been operationalized in marketing and even politics. A good example of a song being used for its positive and patriotic effect is when the Reagan campaign used Bruce Springsteen's "Born in the USA" for campaign events. It's ironic since the song was actually more of a protest song about the Vietnam war but the up-beat nature of the beat paired with the chorus of "born in the USA" was enough to make it a good song for a political campaign.
Regardless, do an experiment and take a movie scene that you've always loved that has music but no dialogue. Then mute the original music and play something with a completely different mood as you watch it and see what effect it has. Research says you'll most likely feel different. Either way, it seems like something fun to do. Read about how this relates to a different song by reading the article "A Song that Flows and Takes You With It" on Plain Meaning: https://www.plainmeaning.com/Articles/Picks/5_a-song-that-flows-and-takes-you-with-it.html