They cut supply of DDR4 around the same-ish time because DDR4 prices were dropping significantly (due to oversupply) and Intel and AMD processors were going to DDR5.
If the AI bubble hadn't come around buying up all the RAM, most new ram purchased today would be DDR5. The shift towards selling more HBM is also probably a bit unexpected.