The principal or most important spring in a piece of mechanism, especially the moving spring of a watch or clock or the spring in a gunlock which impels the hammer
If you say that an idea, emotion, or other factor is the mainspring of something, you mean that it is the most important reason or motive for that thing. My life has been music, and a constant search for it has been the mainspring of my life You begin to understand what actions were the mainspring of the story