ROCK 4 SE Case and Fan how to connect and control the fan

Hi,

I have the ROCK 4 SE and the Metal Case with the Fan and Heatsink

I’m struggling to find how I am supposed to the connect the red, black, blue cables from the fan to the correct pins.

I have flashed the Debian 11 Desktop from here:

Once I have connected the fan to the correct pins how do I then control when the fan should run using software?

Thank you for any help.

Colin