If you have a cavity that you can't afford to deal with go get some clove oil ( yes, I know how people feel about essential oils and I usually agree- but this is legit) and cotton swabs. Soak the swab in the oil to excess and then put the swab in the cavity and squeeze the excess oil into the cavity. This is going to taste like you ate a thousand pounds of cinnamon and your mouth might water- a lot, but clove oil is a dentist approved antiseptic. You have to be careful, it can burn your face skin if you get it anywhere unintended.
I have been slowly losing my teeth over the past decade and am too broke to fix it, so I had to rely on clove oil between being able to afford extractions. It helped a lot. If the oil doesn't work then the infection is too far gone and you need good antibiotics. They wouldn't even be able to extract a tooth that bad.