Yes, you can absolutely play racing games on a Mac. There are numerous racing titles available for macOS, ranging from arcade-style racers to more serious simulations.
You can find many of them on the Mac App Store or through platforms like Steam that support macOS. If a specific Windows-only title catches your eye, running Windows through Boot Camp or virtualization software can open up even more options.