So,I get regular oil changes in my 2018 Hyundai elantra, but never thought to check oil levels between changes. My car started to stall going up hills when rpms got below 1000. Took it to a shop and they tell me, "you're out of oil" I'm thinking the last guys who changed my oil didn't tighten the valve correctly and there was a slow leak I wasn't aware of. Same day my check engine light pops on, camshaft position timing sensor code. So,they fill my oil tank and I drive for a bit...no more stalling. But the CE light comes back on,same code. Help!
Since the variable valve timing (VVT) system uses oil to cause the change, it could be the lack of oil has damaged it. The code which keeps popping is most likely going to lead you to the exact problem. Usually it would either be the cam phaser or the solenoid which controls the oil flow.
If the CEL continues to come back on start after start, it may be the code wasn't cleared. Your descriptions doesn't lead me to believe one way or another on this, so would suggest to you if the code has not been cleared, to go ahead and do that. If it then comes back, then the specific code is going to be helpful to continue diagnosing what's going on.