'By' and 'with', are the two main prepositions of instrument or agency.
'By' is used when you want to talk about an action that was performed by a person, and 'with' is used to talk about something that was performed with the help of an object or instrument
This cake was made by my mother. (person)
The Da Vinci Code was written by Dan Brown.(person)
The window was broken by my brother.(person)
The cake was made with the new mixer. (object)
The toy was fixed with some glue.(object)
The vegetables were topped with a knife. (instrument)
Watch our video to learn more about prepositions of agent and instrument and to hear even more examples.