Milk is mainly protein, which is equivalent to protein powder to some extent.
Bananas are mainly composed of carbohydrates, and the actual sugar content of mature bananas is not low.
It is suggested to eat bananas before exercise, increase energy through carbohydrate intake (in fact, many NBA players are between trainings), and drink milk after exercise to increase protein intake.
Bananas are rich in potassium ions, which can enhance muscle strength and endurance. Carbohydrate after exercise helps to restore physical strength quickly.
It will help you gain muscle, but whether you can gain muscle depends on the total amount of protein, carbohydrates and fat you consume.