check engine lights went on and engine stops or no power on 2005 Toyota Corolla

after awhile turn on ignition key and its start but power goes out and no acceleration

Asked by for the 2005 Toyota Corolla
Has the Check Engine Light been on? It is likely a key or vital input sensor has failed like a cam, crank angle sensor or air flow meter sensor has failed. Possible a fuel pump has failed but in any rate plugging in a scan tool to the 16 pin diagnostic socket under the dash, and either reading stored fault code information or live engine data will be the most efficient and productive way to figure out what has failed on your Corolla.