Yes, the Apple iMac can play games. The performance will depend on the specific model and its hardware specifications.
Generally, iMacs with more powerful processors and graphics cards will offer better gaming performance.
However, it’s important to note that while iMacs have improved in gaming performance over the years, they may not match the highest-end gaming PCs, especially those with top-tier graphics cards like the Nvidia RTX 4090. For the best gaming experience on an iMac, you might need to adjust game settings, such as lowering some graphics settings or switching between windowed and full-screen modes.