Since you are saying the tooth is decayed since few years, it's a long standing case. You should first have an xray for the tooth to get te idea of how farvtge infection has spread. And since it's a molar tooth, you should first try to same remaining tooth structure as it is a vital tooth that helps in chewing. Rct might be advised depending on the radiographic examination. If the tooth has nothing to be saved, it can be extracted followed by implant or any other prosthesis depending on the physical condition of teeth and surrounding tissues.
Next Steps
visit your nearest dentist and ask for more visual ideas i.e. xray.