After a month and a half of not driving the car, yesterday I tried to turn it on, however the only sound that I heard was the rotation of the starter, which is not engaging the flywheel (the engine is not turning over). Additionally, there is not a clicking sound when I turn the key to ignition.
I've tried multiple times and the result is still the same and I've checked the the battery voltage: 12.2 V, which is not 12.6 V, but there were some large temperature variations that explain possible discharge.
In my opinion, the most probable cause is the starter solenoid or some electrical component related to it, like a relay or fuse.
What testing procedure could I follow to detect and identify the problem given the above "symptoms"?
More specifically, how can I test whether there is a electrical (relay, fuse) or mechanical (solenoid, shift lever) problem?
I was not able to find a schematic, but this what the starter looks like externally; above is an old one and below is a new one.
The car is a 1997 BMW E39 520i