The energy of a mechanical wave (in this case, the sound wave, which stimulates periodic movements of a gas) is proportional to both amplitude and frequency. Often, I read that it is written that energy depends only on amplitude, but when I have two waves with the same amplitude, and one has a higher frequency than the other, it apparently carries more energy. It has a shorter wavelength and moves the molecules much faster over the same distance. Since $E=F \times s$, a wave with a higher frequency must carry a greater force (and therefore energy) to overcome the inertia of the molecules more quickly.
But if a wave with a higher frequency imparts more kinetic energy to the molecules, shouldn't the molecules also oscillate with higher amplitude? But then it would be as if the amplitude had been increased, not the frequency. Something seems off in my interpretation, and I would like to understand where exactly more energy resides in a wave when I compare precisely one cycle of two waves with the same amplitude but different frequencies/wavelengths?