Computer Whirring Sounds

Does it make the sound under the same or different tasks?, if the tasks are CPU demmanding and make it warmup. It could be a fan or hard drive but the hard drive would make the sound more permanent. A fan could make the sound if its bearing needs lubrication if it's old enough, and if it's enabled for variable speed in Power Options in either Windows or the BIOS.

To diagnose the sound; You can change the Windows default Power Saving Plan "Balanced (Recommended)" for the "High Performance" plan.. this will make the CPU cooler fan run at maximum RPMs and the whirring sound should become constant or at least more frequent. And if it's not the CPU cooler fan, that will not make a difference.

See if you find any coincidence described here.
https://www.pcworld.com/article/210432/whirring_noise.html