I think that yours is a reasonable question, but there's some good answers. First of all, short of things like Plutonium, nothing is categorically "toxic." Toxicity is a function of two things: the substance and its concentration. Even water is toxic to humans at a high enough concentration. This overall notion is often referred to as The First Rule of Toxicology: "The dose makes the poison."
Secondly, the toxicity of a given element varies greatly based on its molecular form. Consider these two elements: Chlorine and Sodium. Both of these elements are pretty nasty substances on their own. Chlorine gas is very poisonous to humans and is banned as a chemical weapon. Sodium is a volatile metal that reacts violently with water to produce highly caustic lye. No one in their right minds would ingest either elemental Chlorine or Sodium. But when combined, the situation is totally different. You get Sodium Chloride, AKA "table salt". While, as with anything, you can die from eating too much table salt. We're talking an orders of magnitude difference in toxicity between the elemental forms of Sodium and Chlorine and table salt. But just like RFK Jr. claiming that a vaccine contains a "neurotoxin", I can claim that the stuff you season your ear of sweet corn with contains a "deadly chemical weapon."
Regarding mercury, it is sometimes used in multi-dose vials of vaccines to prevent fungal contamination of vials once the seal is broken when they start using the vial. If you'll recall, a few years ago there were
a large number of people who were sickened or killed due to contamination of vials of steroids produced by a "compounding pharmacy" with poor sterile conditions. Mercury-containing Thiomersal is used, in very low concentrations, in order to prevent such tragedies. But the mercury is not elemental, it's in a compound (like my salt example): ethylmercury. While ethylmercury isn't nearly as "safe" as table salt and is hazardous at high enough levels, it's no where nearly as dangerous as the other common mercury compound: Methylmercury. Methylmercury is some pretty nasty stuff. One key difference is that our bodies have a very hard time removing methylmercury from our blood and tissues. Because of this methylmercury is considered a "bioaccumulative environmental toxicant." Again, Thiomersal doesn't contain the methylmercury form of mercury. Instead is contains the less concerning ethylmercury and our bodies can remove. Also, thinking back to the First Rule of Toxicolgy, vaccines use/used very very small volumes of Thiomersal, of which only one ingredient is ethylmercury.
Now let's look at RFK Jr's boogey man, Aluminum. Why is it in vaccines? Vaccines usually have two important components: antigens and adjuvants. Antigens are the dead or weakened parts of the target virus or bacteria that your body then reacts to in a "immune response" and learns how to manufacture antibodies against for the future when the real virus or bacteria shows up. Along the way, scientists learned that you can boost a body's initial immune response against an antigen by adding other things to the vaccine along with it. These became known as "adjuvants" (Latin for "Help towards"). The end result is that adjuvants improve vaccine effectiveness down the road. Many of the best adjuvants that we use are aluminum salts (remember that table salt is a "Sodium salt" in the same sense of the term). It's also important to remember that your body rids itself of both antigens and adjuvants that are contained in vaccines. What protects you long-term is the "knowledge" that your immune system gains by its brief encounter with the antigens and adjuvants contained in the vaccine. It's a common misconception that vaccines just "build up" in your body as they are administered to you.