Sounds like Rod Knock

Folks can get confused by the sound of severe pinging, thinking it is engine parts knocking rather than what it is, the sound of the gasoline exploding prematurely in the cycle. OP’s description doesn’t really sound like pinging but good idea to eliminate that as a potential cause before embarking on expensive testing or tearing the engine down. Recommend to check the ignition and valve timing, that there are no lean or rich diagnostic codes, and make sure the coolant is running at the correct temperature. Since it came on all of a sudden like, might want to do a drain and fill on the fuel tank too, to eliminate bad gas as a cause.