OK, that could be analogue or digital.
Analogue ones need 4 wires. They need battery supply for power (normally red 36v and black ground). When switched on, they connect the battery voltage to a third wire, which goes back to the controller to power it (normally blue, sometimes pink or orange). The 4th wire is the one that determines the power level - something like 1v for level 1, 2v for level 2, 3v for level 3 and 4v for walk assist (normally green)
Digital ones need 5 wires. The first three are the same as above. Wires 4 and 5 transmit and receive data (marked Tx and Rx on any pcb and are typically yellow, green or white).
Whatever you have, the controller will give level 1 if the data comms don't work or there is no voltage on the green analogue wire, so the probability is that one of those wires has been pulled and is now disconnected.
Another potential cause is when water gets in the control panel and wipes out software or comms.
If it's a 4 wire one it's easy to test the green wire by either opening the motor controller or directly on the connector if it's the block type.
If the control panel has screws in the back, open it up to see if a wire is off or whether there's any water damage.
You can make an opportunity out of a crisis by upgrading your controller and control panel to KT ones for about £80, which will be a massive improvement to your bike's power control and ride quality, so don't waste money on replacement parts without considering that. The change normally requires some soldering of wires.