Feature selection - SelectKBest sklearn
This is a hyperparameter. And so this is usually approached with some sort of hyperparameters search with cross-validation, like GridSearchCV or RandomizedSearchCV.
https://scikit-learn.org/stable/modules/grid_search.html