thanks for sharing your concern.
i guess your root canal treatement is incomplete. is it so?
root canal treatment
is done in three steps like initially cleaning and shaping of canal,then obturating it with guttapercha and then finally sealing it with suitable restorative material.
after which the tooth is crowned to prevent it from fracture
due to brittleness with prosthetic crown.
also i suspect canal cleaning and shaping is not sufficient because of which you are experiencing pain.(infection)
i would suggest to revisit your dentist
and get an xray done to see if any periapical pathology has developed.
re entering the canal and aseptic canal preparation would help.
be sure after RCT your tooth will be painless