I recently faced a similar problem with a phone that had its screen slowly turning black after it was accidentally dropped. The process of turning black lasted about two days so I was able to react.
First thing I did was remove any device locking method (PIN, face unlock etc) so that this would not get in the way once the screen was completely unusable.
I then allowed device debugging via USB and used scrcpy (link to scrcpy on github) to mirror the screen to my Linux PC (and control the device via mouse). Through this, I was able to move any data I still needed away from the device even after the screen was completely black
There are precompiled binaries for scrcpy on the GitHub project site.
I recently faced a similar problem with a phone that had its screen slowly turning black after it was accidentally dropped. The process of turning black lasted about two days so I was able to react. First thing I did was remove any device locking method (PIN, face unlock etc) so that this would not get in the way once the screen was completely unusable. I then allowed device debugging via USB and used scrcpy (link to scrcpy on github) to mirror the screen to my Linux PC (and control the device via mouse). Through this, I was able to move any data I still needed away from the device even after the screen was completely black There are precompiled binaries for scrcpy on the GitHub project site.