Overheating that appears only at higher rpm means the cooling system copes at low heat loads and runs out of margin as heat output rises. That narrows the search usefully.
Raw-water flow is the first suspect: a partly blocked intake or strainer, a tired impeller, a collapsing suction hose or a fouled heat exchanger will all pass enough water at low load and fall short at high load. Check the volume of water leaving the exhaust, not just that some is leaving.
A restricted exhaust does the same thing, as does a heat exchanger or aftercooler with scaled or blocked tubes. On the coolant side, a weak pump, a tired thermostat or trapped air shows up under load first.
Finally, consider that the engine may simply be overloaded — a fouled hull or wrong propeller makes it work harder for the same speed, and heat rises with it. Note the maximum rpm you can reach and whether it matches the engine's rating. If it does not, treat the overheating as a symptom of overload until proven otherwise.