See a doctor if you have persistent pain, the nail is lifting significantly, pus is present, or the discoloration has no apparent cause. A professional assessment is also recommended for recurring symptoms, underlying conditions such as diabetes, or a suspected infection such as nail fungus. This can help identify serious causes early.