Well it could be worse! The display has become unglued from the case which likely saved the screen. Even still this is not an easy fix given how badly the case is bent. I would carefully remove the display fully cleaning off the old adhesive from the frame so you can then re-attach it. Follow this guide to take the screen off iPad Pro 12.9" 5th Gen Screen Replacement and you will need iPad Pro 12.9" (2021) Adhesive Strips to reattach.
But before you start make sure you have a good backup of your data..
Now with the display removed and the battery disconnected using some blocks of hard wood and a medium weight hammer you should be able to slowly coax the frame back into shape. Go slow and don't over do any one area as you don't want a wavy frame either. You may want to practice with some aluminum sheet stock that's on the thick side.
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
3
crwdns2947414:01crwdne2947414:0
How did it bend? Often a failing battery can cause the case to distort.
Take a straight edge ruler placed on the screen where it's bent as well as across the case back. Also note if the display glass is correctly seated in the case. Take some pictures so we can see the issue posting them here so we can see.
crwdns2934271:0crwdnd2934271:0 DanJ crwdne2934271:0