Standardization on training and split data
You should only fit your scaler on training data. Your scaler is part of your model and fitting your scaler to some data can be considered as learning from this data.
Test data is used to evaluate your model on previously unseen data, so if you fit your scaler to test data, it is not &quot;unseen&quot; data anymore.