I went through almost the same thing last year. It started as a small rattling noise, then my Check engine light popped on. Turned out to be a leak in the exhaust manifold. The guys at
https://www.vip-servicecenter.com/ fixed it quickly and said that leaks can mess with your car’s oxygen sensors and cause weird readings. The car ran smoother and quieter afterward — I didn’t realize how much noise I’d gotten used to!