try regularization techniques : L1 and L2 which will remove the unnecessary columns eventually. Regularization can help the model generalize better when dealing with high-cardinality features. Ensure that you're applying appropriate regularization to avoid overfitting,