But you are right!
If the impeller of the turbo just sat there in the air flow it would slaughter the performance, but lucky for us some smart arse (a Doctor Buchi actually in 1920 -something) worked out how to spin the impellers at tremendous speeds using the exhaust gas to drive it. 1920 decade mind, in diesel engine railcars.
Quote
The first exhaust-driven supercharger was developed by Dr. Alfred J. Büchi of Switzerland between 1909 and 1912. Dr. Büchi was Chief Engineer of Sulzer Brothers Research Department and in 1915 proposed the first prototype of a turbocharged diesel engine, but his ideas gained little or no acceptance at that time.
The rest is history.
CharlesY