You likely are experiencing a reversible pulpitis. A reversible pulpitis is where the nerve of the tooth is a little inflammed. The good news is this can often be fixed relatively quickly and cheaply. You can use Colgate Sensitive Pro-Relief or another desensitising toothpaste for a few days. If that doesn’t work you should see your dentist reasonably quickly before it gets worse.
Make an appointment to see a dentist