First thing to do is back anything on it you don't care to lose.
Second thing is to replace it. I cannot imagine any situation where a drive starts to make a loud noise and continues long term reliable operation. You can spend some time with diagnostics and might determine why it is about to malfunction but there are not generally user repairable parts that can be replaced when they wear out.
Of course you first need to make sure it's the drive and not a case/CPU/PSU/GPU fan that is making noise. If you just hear a noise from the PC is is most likely a fan going bad.
Good luck!