Hi. Severe sensitivity in tooth after a cavity usually happens when the cavity has gone deep enough to infect the nerve of the tooth.
In such cases, a simple filling will not work and you would have to get a Root Canal followed by Crown.
Next Steps
You need to get an x-ray first, so as to make it clear how deep the cavity is and what treatment is needed.