There are literally dozens of things that can make a check-engine light illuminate, Kathleen. A faulty sensor, dud component, bad or dirty fuel, a vacuum leak, you name it, even the smallest glitch can cause the dreaded check-engine light to ruin your day.
The best advice is to take the car back to the workshop that serviced it and ask if, perhaps, the mechanic forgot to tighten or reset something properly. An interrogation by the workshop’s computer should throw up any fault codes present and from there, the workshop should be able to figure out the actual problem. It could be a coincidence, but, equally, it could be a simple thing the workshop has overlooked or forgotten to reset during the service.