Sound is a periodic disturbance of a medium, we can generalize to any disturbance of a medium.
For a thought experiment, imagine a very long wire in tension. About the same tension as a guitar string, but much longer.
You give that wire a whack with a hammer, so the initial disturbance is local. That disturbance starts to propagate. What factors determine the speed of that propagation?
Tension of the wire
Wire that is away from the equilibrium position pulls on adjacent wire, pulling it away from equilibrium. The higher the tension, the more force is available to pull on neighbouring wire. The tension in the wire pulls back to the equilibrium position, and then (because of velocity) the motion overshoots, which is also communicated to neighbouring wire.
Opposition to change of velocity
In this thought experiment the wire is composed of matter, it has inertial mass. For the same amount of tension force: a thicker wire will have a more sluggish response to exerted force, because it has more inertia. Once the wire has velocity it is harder to reverse that velocity, because it has more inertia.
Translating that to propagation of sound in air:
Every gas has an elasticity; air has elasticity. The elasticity of air provides restoring force.
In a gas with a higher or lower density sound propagates at a higher/lower velocity, because with higher/lower density you have more/less inertia per unit of volume.
I started with the thought experiment of a long wire under high tension because with a wire you can have a disturbance with the amplitude of the disturbance at right angles to the direction of propagation.
I figure that makes it easier to build an understanding of why (in general) speed of propagation of a disturbance is independent of frequency.
In the case of the wire: the speed of the sideways motion (frequency of oscillation) is of minor influence; it is because of the tension in the wire that a disturbance is communicated along the length of the wire.