We can’t do anything about the noise from the computer fan.
If you are using a microphone that plugs into a USB mic pre-amp with a 3-pin “XLR” connector, then you could use a lead that is long enough to move the computer out of your recording room, but of course that would have the problem that you would not be able to see the computer display or reach the keyboard.
An alternative would be to get a stand alone digital recorder (many models are available, with prices starting at around $100)
If the microphone is in a different room from the computer & the fan noise being recorded is loud,
then you should check you’re actually recording from the external microphone rather than the computer’s built-in microphone.
All that and do not interfere with the laptop cooling itself.
This is a Zoom H1n. I produced a voice track which passes audiobook technical specifications—including noise—pretty much as you see it here. Just add quiet, echo-free room.
There are forum postings from people using H2, H2n, H4 and H5. Doesn’t have to be Zoom. Other people make good stand-alone sound recorders. Pay attention to recorders insisting on being “Voice Recorders.” They may have shortcuts designed to record voice and not much else. The shortcuts may make it difficult to master, produce your own effects or produce music.
And yes, it does appear you’re recording from the wrong microphone. You can do a scratch test. Start a recording and scratch your microphones.
I can attest to the mistake of recording from the laptop microphone when I thought I was using the external microphone. It’s easy to do, so double-check that your input to Audacity is the external microphone. It should show up in the drop-down mic selection menu.