Hi,
I realize that you may not have a screen display but try the following to see if you do get a display and then if either resolves the problem:
i). [https://www.hardreset.info/devices/samsung/samsung-galaxy-a51/wipe-cache/|Wipe the cache partition] and check if that resolves the problem.
ii). Start the phone in [https://www.verizon.com/support/knowledge-base-230328/|safe mode] and check if it works OK.
If it works OK in safe mode then a ''downloaded'' app is the cause of the problem. You will have to uninstall each ''downloaded'' app, one by one and test the phone in normal mode between each uninstall to see if it works OK. When it does then the last ''downloaded'' app that was uninstalled, was the culprit. A downloaded app is one that you ''downloaded'' and installed on the phone and was not pre-installed on the phone when you first got it.