The tree leans to the wall. (contact)
The tree leans against the wall. (same meaning)
How do you feel with verb ‘apply’
Apply varnish to the surface.
Apply varnish against the surface. (this doest not go well the action) Similarly with verb ‘smash’
this is not a simple movement, it is a movement with force and making sound. Both prepositions can be used but you get the real meaning/sense of smash with the use of ‘against’
Student or Learner