I disagree with that. The use of a gun is the use of force.
It might be more accurate to say that the major function of guns is to use force to attain one’s objectives and to keep others from attaining their objectives.
A guy robbing a liquor store with a gun isn't primarily interested in killing the clerk, his objective is to get money and he may use a gun to force the clerk to give him some money. At the same time, the liquor store clerk isn't primarily interested in killing the robber, his objective is to keep the robber from robbing him and he may use a gun to force the robber to stop.
“The major function of guns is to deter the use of force.”
In the hands of the law-abiding, this is absolutely the case. It is THE major justification of the right to bear arms.
It enables the liquor store clerk to foil the robber’s evil intent. It empowers the citizen by putting disquiet into the minds of government enforcers.