Most probably there is a cavity. U need to visit your dentist
for filling if the cavity is shallow or go for RCT if the cavity is large and hurting the pulp. If no cavity use a good desensitizing paste available in the market like Vantej, Thermoseal , Sensodyne repair etc. Apply the paste for about 30 sec on the tooth first and then brush. i hope this helps.