Short answer. eBike pedal assist that stopped working is usually a bad PAS sensor, a misaligned magnet disc on the crank, a torque sensor calibration issue, or a controller fault. PAS sensors are cheap and swap in about 20 minutes.
Step by step
Confirm the assist level is above zero. Sounds obvious but check the display. PAS 0 disables assist entirely.
Check the magnet disc. Cadence sensor eBikes have a plastic disc with magnets on the crank. If it has shifted or lost a magnet, PAS will not read pedaling.
Recalibrate torque sensors. Torque sensor eBikes need calibration after rear wheel work. Aventon and mid drive systems both need this.
Swap the sensor. PAS sensors are $15 to $30 and one of the most common eBike failures. Any mobile mechanic carries them.