2007 GMC Yukon knocking sound

throwing same codes after fixing, engine light coming on during the process. then won’t stay cranked one day had to tow it. unplugged ecm and acm i think those are the names. they’re located under hood and under dash. stays cranked now, has knocking sound, i’m told it’s the lifters or the cam shaft, but won’t throw a code so they can know for sure. HELP!!!

Have you checked the engine oil level and the coolant level?

Is the noise a rather low pitched sound, coming from the bottom end?

Or is it a high pitched noise, like a ball point pen clicking rapidly?

What codes is the vehicle showing?
What repairs were just done?
Why were those repairs done (What was the original concern?)

What engine is in this 2007 Yukon? Does the knocking go away as the engine warms up, or stay all the time?