Well as you have mentioned your smartphone restart automatically
Well if anyone is in this situation then you can go for force reboot
[link|https://howtofixgadgets.com/poco-m3-restart-problem-solution/|https://howtofixgadgets.com/poco-m3-restart-problem-solution/|new_window=true]
If the phone is totally dead then check the battery and the patti/ flex cable sometimes water damage damages it and this cause the problem.
Hope this was helpful if you face any problem then just comment.