The song, that’s free to use for YouTube videos, sounds like a jazz song and it’s in the key B-flat minor (I am a music composition specialist, and by hearing it I knew its key). It begins with a guitar loop. Last time I heard it was in 2021 or so, but I still remember how it sounded like. I think that it wasn’t from YouTube audio library either.
Might be a song from Kevin MacLeod? His songs get used a lot on the YouTubs.
https://incompetech.com/music/royalty-free/music.html
When I just searched “Kevin MacLeod jazz”, the first result was “Acid Trumpet”, which seems like it could fit your description.
I’m not very musically inclined, so I have no idea if this is B-flat minor or not, but what you described kind of sounds like “Jazz in Paris”: https://www.youtube.com/watch?v=mNLJMTRvyj8
It’s one of the songs that you can select from Google Photos when making a highlight video.
It’s not this song. It had sampled guitar loops that similar to hip hop, but it was faster than hip hop
Maybe the wiki from r/WhatsThisSong is useful for you, they describe first steps to identify songs: https://old.reddit.com/r/WhatsThisSong/wiki/index/
Also humming it for others to get an idea can be useful too.
If you could hum or record what you remember in some way, it would help a lot.
If you know of any specific YouTube videos that use the music you are thinking of, it might be named in that chunk of the video description which automatically identifies music used in the video. Or, failing that, you can ask the video creator.