Chosen Solution

Are the two versions compatible?

Are you a gambler? Are you willing to take a risk? Frankly, I wouldn’t do it until I had the display ID info. On the back of the panel you should find it does it match? If not, I think its to big a risk. 21.5” iMac 4K Retina Display Assembly (2019) Apple P/N 661-12564 21.5” iMac 4K Retina Display Assembly (2017) Apple P/N 661-07322, LG ID# LM215UH (SD)(B1)

I don’t think you should do this. You should know more about the details display screen. If everything is okay then go forward.