Skip the cutscene at the beginning of the fight. This also skips Ook's first attack of cutting two baba serpents off the ceiling.
Once the cutscene is skipped, approach Ook. Ook will either be facing towards or away from Link and will begin hopping around the pillars once he notices Link.
RNG dictates how many times Ook will hop before throwing the boomerang, from as few as two hops to a theoretically limitless upper bound, though single digit numbers of hops are most common. If Link is too far away from Ook when he stops hopping, then Ook will taunt Link and begin another round of hopping once Link gets close enough.
When Ook throws the boomerang, roll into the pillar to knock him down.
With the Master Sword, a jump attack into a quickspin (hits twice) followed by a stab finishes the fight in one cycle.
With the Ordon Sword, a jump attack into a quickspin (hits twice) followed by a stab causes a second cycle. Repeating the same attacks the second time he's knocked down finishes the fight.
There is RNG at the beginning of the fight:
It is possible for the game to crash on this fight. If Ook is knocked off his pillar the frame the boomerang returns to him, then the boomerang will be in Ook's hands rather than resting on the pillar. Killing Ook at this point crashes the game, since the cutscene with the boomerang afterward can't play properly. See the video below for an example of this.