I think you’re right to give the car the service maintenance stuff it needs if it is at the recommended intervals. Spark plugs, air filter, check the idle rpm and timing, etc.
If it isn’t one of the O2 sensors that have failed, it must have something to do with the incoming air/fuel mixture. The MAF, MAP, coolant temp sensors, fuel pressure at the rail, leaking injectors are all suspect.
Do you have any pending codes?