The few seconds sample thing is an urban legend, unfortunately.
Any audio of anyone playing is "real music"-- it may not be a published composition, but it is recorded audio of someone playing (or someone having programmed a computer to play) and someone owns the master recording. If it isn't a published composition then probably they made it in a studio specifically for the game, and the copyright owner is just EA.
Lots of people use copyrighted music in Youtube videos without permission. Usually what happens is either the videos don't get very many views and no one notices, or the Youtube algorithm catches it and slaps an ad on the beginning of the video to collect money for the copyright holder. This depends on how the copyright holder has it set up. They can also set it up to automatically block your video instead, but most don't.
But if you are making something that might get a lot of views, you might want to be a little more careful. It sounds like you are thinking this way else you would not have asked the question :)
Copyright laws differ by country too. This is a good explanation of how it works in the US-- since EA and Youtube are both in the US this might be a good starting place
https://diymusician.cdbaby.com/music-rights/clear-samples-to-copyrighted-music/
Think about the famous case of Vanilla Ice borrowing the bass line from “Under Pressure.” The sample is probably only 3 seconds long, but that didn’t stop Queen and David Bowie (or their labels/publishers) from swooping in to collect the cash.
So no, you can’t legally sample something (no matter what the length) unless you’ve cleared that sample with both the owner of the song and the owner of the sound recording.
Edit: EA absolutely positively would have had to pay to license the rights to every song in the game that wasn't written in-house by EA, like the Simlish versions of songs by other artists that appear on the in-game radio stations.