check engine light is on - gas cap? or oxygen sensor
What is the code number(s) do you have? Please post the codes.
Gas cap or oxygen sensor are certainly possibilities. I have seen a myriad of reasons, some minor, some important, for the Check Engine Light to come on. You will know the code number (as per PUREBRED, below) if you were to plug in a code reader and look up the meaning of that number online. Buy one if you want ($12.99 and up), or stop by (soon) at NAPA , Auto Zone or similar parts store and they will read the code for you for free. (They do this as a service hoping to get your business (Ox sensor, etc) if you are a do-it-yourselfer.)
Unfortunately, or fortunately, modern cars (2007 Prius, same as mine) are much more computerized, and there are many fewer things you can do yourself these days without the training and the newer shop equipment, then back in the days when I was coming up.
As Click and Clack always said: a good mechanic is worth a tray of brownies (…every visit??). Do see https://www.cartalk.com/mechanics-files to find one if you don’t have one yet. Best of luck.
Brownies not required on first visit, only after successful, and not TOO expensive, resolution of the problem. Oh, and Respect! If they respect your opinions, and even respect any stupid questions, then you ARE in luck.