hello and welcome,
according to your description its not clear that what kind of restoration have you got done.if it is a silver amalgAM RESTORATION,mercury in it can cause toxicity.
do you had any injury
while doing the instrumentation by your dentist?
the soreness can also be due to other filling materials like calcium hydroxide or dycal,eugenol,formocresol etc.
apply dologel/mucopain gel on the affected site.if it do not subside even after few days,visit your dentist for the diagnosis.
do you have tobbacco/pan/squid chewing habit?if you have any,please stop it as it can cause burning mouth,limited mouth opening etc.which will lead into a condition called oral submucous fibrosis
if the symptoms persist,get the cavity refilled by any other filling materials other than the now placed filling.