I had a similar problem two months ago! I've bought new headlights at https://www.uzooka.com/toyota-headlights/ and tried to install them by myself, but as a result I tapped into the wrong wire and caused that "check engine" light to come on again. Try to check all the fuses using a test light, if it doesn't help I think it's better to consult with the professionals.