Your printer may be in an offline state. Hence, it may turn on for a while but may eventually enter this state. In this case, you should check that the connections are not loose. Also, inspect for any damages in the connections. It is possible that the wires may be old and, hence, may not work.
While you try this fix, you can see the other measures too: https://www.errorsdoc.com/epson/solved-why-is-my-epson-printer-say-offline-in-windows-10/