"Lower Body Exercises"
Let's define our terms. In lifting, squats and deadlifts are considered the primary "lower body exercises", but in truth they develop strength in the entire body. You could focus on "legs" specifically by using machines (leg press, leg curl), but that would be wildly inefficient and unproductive. Heavy barbell squats and deadlifts will get you much, much stronger over your whole body, including your legs.
As Second Nature Fitness puts it, "Due to its difficulty and impact on the body, the deadlift is an essential part of everyone's program - regardless of goals."
A functional human being should be able to squat and deadlift a significant amount of weight in order to maintain strength and mobility. This makes you less disposed to injury and able to do more things.
Strength For Running
It's common knowledge, and stands to reason, that being stronger will help you run faster. Deadlifting in particular is recommended for running. It strengthens your hamstrings and back, both of which are essential in running. Per Healthline:
Deadlifting is important for athletes because it requires several large muscle groups to work in a coordinated fashion. Athletes also use this versatile lift to develop explosive strength through the legs, hips, and back. Performing deadlifts will benefit you in any sport that requires jumping, running, lifting an opponent or object, or moving quickly from a stationary spot.
Your Situation
It might not make sense to start lifting for the first time a month before a race. Your legs may be very sore for several days when you first start, since your body is not used to that kind of work. Therefore, it would probably be wise to begin lifting weights after your first 10k is over, not before. Also, having more muscle may or may not help with the ache you feel in your muscles when running. It will probably make you faster and less injury-prone, however.
Once you are able to start, lifting will definitely get you stronger (and therefore healthier) and faster. One of the best resources for getting started is Mark Rippetoe's Starting Strength (book and wiki). You could either take a few months off from running and do a novice progression, or you could simply add a squat/deadlift workout a few times a week to your current regimen.
A typical novice progression (cribbed from Starting Strength) is essentially:
- Lift heavy three times a week with a barbell, doing a few sets of not more than six reps
- In each lifting workout you will do: squats, bench press/overhead press, and deadlifts/chin-ups. (Slashes mean you alternate the exercise each workout.)
- At each workout, you lift a little more in each exercise than you did in the previous workout.
Other novice progressions (like GreySkull LP) focus more on the upper body, but that wouldn't make sense for someone interested in running. The specifics aren't terribly important; the core idea is a small number of full-range-of-motion compound barbell exercises done heavy for a few reps, increasing in weight each workout for as long as possible.