It is always recommended to test your repair before applying any adhesives or putting it fully back together. I am going to assume you did this so you have easy access to the internals for testing purposes?[br]
[br]
I have seen similar problems when the battery was not connected properly. First recommendation would be to try disconnecting and reconnecting the battery again. [br]
[br]
If that ends in the same results, I would question the screen you bought. Here on iFixit, parts are often listed properly with exactly what models they are compatible with. For example, the screen for this model is only compatible with SM-A515F, SM-A515FM, SM-A515FN, SM-A515GN, SM-A515W, and SM-A515YN. This is notably not all the versions of this phone released in all regions throughout the world. If you bought your part here and your model of A51 is not one of these versions, the screen is incompatible and can lead to unknown errors such as you described. If you bought your screen on ebay/Amazon/etc., many vendors are not as open and/or honest with what exact models their parts are compatible with, and may sell you a part that simply does not work on your device. If you bought a screen in a frame, you have more considerations because things like antennas that may be embedded in the frame are calibrated to the frequencies in different countries and will not work and cause errors if installed onto an incorrect motherboard.[br]
[br]
As Jerry recommended, giving us exact details on the part you bought as well as your device will help to identify this issue and possibly find an exact solution to this error.