One honest rule
Your test set is for the final check. The model must not learn from it in any way before evaluation.
If your score is only good because the model saw the answers, your repo will look weak in review.
Why split data
When you train a model, it can memorise patterns from the data. A train/test split checks if it can work on new rows.
Think of it like exam prep. Practice questions are training data. The exam paper is test data. You should not peek at the exam before studying.