Good afternoon ,
If the pain
is lasting for a few seconds it could be senstivity - there are many reasons for that. If it is lasting for almost a minute or so - it could be decay. If it lasts for more it could be deeper decay possible involving the pulp. It is highly recommended that a dental check up is done for the dental surgeon
specialist to differentiate and help you accordingly.