Yes, you can enjoy video game music legally, and it's the safest route by far.
The easiest option is to buy the official soundtrack, which supports the composers and gives you high-quality, legitimate tracks. Many soundtracks are sold digitally and on streaming services.
If you're a content creator, this matters even more. Using music you don't have rights to can earn you copyright strikes, so purchasing the soundtrack or using properly licensed music keeps your channel safe.