Help to diagnose a Samsung S7 Edge blacking out suddenly

I have a Samsung S7 Edge running /e/.

A while ago the battery died. I bought a new one (not original) and replaced it by myself.
3 months later (now), the mobile started to shut down abruptly by no apparent reason. Sometimes it shut down during boot.
I have the impression that it could be a battery issue, but it may also be a electrical bad contact or a system problem.

Does anyone have a suggestion on how I could start to diagnose it?

This looks like a hardware issue but there was an app which our developer recommend to test battery drain. I forgot what the name was :frowning: … will get the name and update on this thread.

Thanks, Manoj! Waiting for the name of the app.

Usually, when it shuts down as I described, I have to plug the device at the energy socket to be able to turn it on again. However, when the display shows how much the battery is charged (before booting), it is never at zero. So, I am confused…

The app name the developer was suggesting is BetterBatteryStats https://forum.xda-developers.com/showthread.php?t=1179809

It was a battery issue.
The one I bought was malfunctioning. When I replaced it, the system was back.
Thanks, guys!