I wrote an article about this a while back… https://www.healthymouthproject.com/amalgams/
Long story short, I generally don’t recommend getting amalgams replaced unless they are wearing out (but I can understand why people do). They do contain mercury, but you get far far more mercury exposure from environmental sources (such as eating fish) or having them removed than you do from amalgams in your mouth.
Hope that helps!