I have had wifi working for twelve hours. It stopped working again.
We don't know whether the modem stopped working or the AirPort Express stopped working, or both stopped working.
To test the modem, you will need to temporarily disconnect the AirPort Express and connect a computer directly to the modem using a wired Ethernet cable connection and let it run for a day or more to see if the modem will hold the Internet connection.
If the modem checks out OK, you can move to troubleshooting the AirPort Express. When you say that the Wi-Fi is not working, does this mean that there is no Wi-Fi signal at all? Or, does this mean that there is a Wi-Fi signal, but you lose the Internet connection?
Even you purchased the latest model AirPort Express.....(this model has 2 Ethernet ports).....before it was discontinued, the AirPort Express is at least 7+ years old and as much as 12+ depending on when you actually placed the product in service.
If your AirPort Express has only 1 Ethernet port, it is as much as 15+ years old.
If the modem checks out OK during your test, and the AirPort Express continues to have problems, the only thing that you can do at this point is reset the AirPort Express back to factory default settings and then set it up again.
Because of the age of the AirPort Express, there is no guarantee that resetting the device will fix the disconnection issue, since the power supply in the Express may be starting to fail.