First and foremost, speed of the propeller does not govern the thrust it is producing. It only limits it from above. The faster the propeller turns the more thrust it can provide, but it can produce less depending on power the engine supplies. With engine at idle, the propeller produces drag only and at higher rpm it produces more drag.
Next engine speed (and aircraft have fixed gear, so engine speed is proportional to propeller speed) does not govern the power it provides either, but also only limits it from above. The engine can only produce this amount of power per revolution, but if you restrict the fuel or fuel-air mixture flow into the engine, it will produce less. Consider coasting at high speed in a car with gear on. The engine turns at high rpm, because it is connected to the turning wheels, but with accelerator released it does not produce any power and the car is slowing down. The same happens in aircraft. At idle the propeller windmills by oncoming air and cranks the engine, but because that produces no power, the net effect is decelerating.
The throttle restricts flow of fuel-air mixture in the engine and is therefore the main control of engine power. "Throttle" really means the restriction flap in carburettor, so in diesel and turbine engines where fuel flow is controlled instead the lever is called a "power" or "thrust" lever.
So why don't you always run the propeller at the maximum rpm? Higher rpm increases wear on the engine. So usually high rpm is used for take-off where maximum power is needed, then rpm is reduced to recommended cruise value to reduce wear of the engine and for landing high rpm is selected again to increase drag of windmilling to slow down and to have full power available in case of go around.