I find that every ceiling fan manufactures internal wiring and switch design seems to be different.
I always try and find the common lead first and then proceed to test for the individual speeds by connecting the wires one at a time and turning the power on and off.
I find that using an ohm meter to try and identify individual windings in this instance is usually is more work than it’s worth, due to the capacitor[s], reversing switch and other components connected in there.
The replacement switches I use have L,1,2,3 marked on them, so at least that part is easy enough to figure out.