DC12V fan controlled by PWM => Noise

There are TWO types of BLDC motor.
For all intents and purposes the one you are using can be treated as a regular DC motor in many regards.
One caveat is that they may exhibit noise unless the pwm timing is within acceptable parameters.

This is where the changes to the timer come in useful.
However that change can also come with a small cost in that the use of a standard DELAY command could be shorter or longer than you might expect.
You can either account for that or use MILLIS instead.

The project I linked you to treats computer fans as DC motors and does not need a library.
It has been running here for a few years now unchanged at all in terms of hardware OR software.

Think of the timer as a regular household clock but with an option to select how long the seconds as we know them actually take to complete. Such clocks actually do exist BTW.

Most MCU's have the ability at a lower level to change some parameters and this is just a small example of that. I had no idea what I was doing when I needed to change the harmonic noise on my fans, with each being slightly different due to manufacturer etc.. This was a learning curve for me but by playing with the timers I was able to completely eliminate the noise.
Not only that I learned a new skill with Arduino.

If you want I can move this topic to PROGRAMMING where you may get a better explanation ?