Lockheed Martin started flying it around in 1997, but it was only in 2005 that it conducted its first operational flight. The mighty machine was supposed to take on threats that kind of disappeared from sight in the meantime, like say enemy nations with organized armies.
Since, at least for now (and thankfully) that’s no longer the case, something had to step in and fill the gap. That something are terrorist groups, against whom the deployment of such a level of sophistication is mostly useless.
So that, and restrictions imposed on exports, meant that production of the F-22 stopped six years after it was first flown for missions, in 2011. During that time, Lockheed made 195 of them, including test aircraft, and the U.S. Air Force is the only one that uses them.
Given how the airplanes cost a fortune to make (an estimated $334 million per piece, including R&D), the American military didn’t discard them, and still uses Raptors.
Proof of that, if more was needed, is this photo here, showing one of four F-22s assigned to the 1st Fighter Wing as it conducts an integration exercise with the F-35A Lightning IIs from the 134th Fighter Squadron (these ones are not visible in this image).
The drill took place at the beginning of November at the South Burlington ANG Base in Vermont. As per the USAF, the reasoning behind the exercise was to give pilots of both types of airplanes a chance to “perfect their skills and be more effective in hostile environments.”