Call of Duty: Modern Warfare II does support crossplay on PlayStation 4, PS5, Xbox One, Xbox Series X, and PC (via Steam and Battle). This means regardless of your platform, you'll be able to play with users on other systems or devices.
Call of Duty: Modern Warfare 3 can be played on PlayStation 5, PlayStation 4, Xbox Series S|X, Xbox One, and PC.