IPhone screen shows Apple icon then shuts off, then repeats

I was updating my software on the iphone when the power went off, then the screen went black and showed the apple icon, then it shus off again, then it shows the apple icon. I plugged it into the computer but they computer does not recogniz it so I can't restore it. What do I do?

To solve a lot of problems on an iPhone, it is useful to hold down the sleep/wake button at the top and the home button at the bottom of the screen, do this until you see the apple logo. This should solve your problem, but if not, you might want to try syncing your iPhone to your computer and then restoring it, if this does not solve the problem then I would advise to go to your nearest apple store. Hope this helps!

My iphone X is doing the same thing. Keeps showing apple sign, turns on then dies, and repeats. It says its on 10% and charging, but keeps doing this. I need help