Can we use a lot of explosives to cause small earthquakes in order to prevent having large ones?
No. Even huge amounts of explosive almost never cause even small earthquakes, and it would take hundreds and thousands of small earthquakes to equal a large one, even if it could be done. In addition, we wouldn't have any control over the size of the earthquake being created if it worked, since small and large earthquakes all start out in exactly the same way. It's just not physically possible.
A possible explosion of magnitude 5.3 occurred in North Korea on September 9, 2016 at 00:30:01 UTC (9:00 am local time).
Mine Blast at Silver Bell Mine, Arizona.