Chosen Solution

I have a dead IPhone XS Max and one with a cracked screen, can I use the screen from the dead phone and use it to replace the cracked screen

You should be able to swap your screens around just as long as the screen from the dead phone works. Just know you may lost some functionality with the phone if you swap parts. A guide is available here: iPhone 12 Pro Max Screen Replacement Good luck!