Modern Warfare tells players they are "unable to access online services," and it's not always apparent what's causing the disconnect. The problem could as easily be server-side as client-side. Here's how to find out whether the problem is your connection or server trouble.
Modern Warfare Unable to Access Online Services: How to Fix Bug
The first thing to check when receiving the "Unable to Access Online Services" message is the status of Call of Duty: Modern Warfare's servers. There are two reliable ways to do this. First, check Activision's official online services site here for word from the publisher itself. Second, a third-party site like Downdetector that relies on crowd-sourced reports can be checked.
If neither of these sources indicates a problem on the server side, the problem may be your own connection. Try restarting your console, resetting your router, and switching to a wired connection. If the problem persists, you may need to look into this port forwarding guide from Activision.