Naive target encoding (computing means on the full training set and applying them back to the same training set) causes data leakage. Your training metrics will be inflated, and your model will underperform on new data. This is the single most common mistake in categorical encoding.