Playing basketball, running, jumping and playing football are all aerobic exercises. These strenuous exercises can lose weight, and regular exercise is good for the heart and metabolism.
Of course, you are thin, so you should either stop playing, or do more anaerobic exercise and eat more protein food.
If you gain weight, it is recommended to go to a professional gym to exercise, supplement protein powder and increase muscles.
If you are a beginner who is not so professional and doesn't want to be so professional, then eat two eggs and two bags of milk every day and do more anaerobic exercise, such as barbell exercise, dumbbell exercise and equipment exercise.
You can do chest presses, pull-ups on your back, and squats on your legs. Many movements have muscles only after practice.