Avoiding noise from a laptop or PC fan is usually very easy, but sometimes it seems the solution just does not occur to people, in which case they will either give up, or spend money trying to eliminate the noise.
When recording sound, it is nearly always best to use a dedicated recording device, as this will result in much better quality. If you are making gaming videos or tutorials on your computer, you will likely know about problems with fan-noise in your recordings (not to mention typing and clicking from mouse and keyboard use).
Clicking and typing noise is hard to eliminate completely, unless you choose to record the sound after recording the video itself. This has its own advantages and disadvantages, but the overall quality of the sound will be much better. Noise from a computer fan is usually easy to manage.
Getting rid of fan noise
Fan noise is an annoying problem when using software such as OBS to record your screen. It happens because the CPU needs cooling under heavy load, and even the most powerful laptops will likely suffer from this problem.
The easiest solution is to move the laptop as far away from the microphone as possible. Using an external microphone on a low gain level, close to your mouth, will sometimes be enough. If this is not enough, you can try moving the laptop further away.
You will need to connect external keyboard and mouse, along with an external monitor. But, once everything is connected, this generally yields good results.
Clicking and typing noise
This is the most persistent problem when making tutorials that I am dealing with. I have noticed people making gaming videos have the same problem.
Again, placing the microphone as close to your mouth as possible will eliminate much of the noise. You can also get a less noisy keyboard and mouse. Such devices may be labled as "quiet", and are specifically designed to create less noise. Finally, try using a noise gate to eliminate stuff below a certain level.
Your video editing software might also be able to remove some of the noise, but I would not rely to much on this, as I have actually never been able to get it to work without also affecting the important part of the sound.
External recording devices
Surprisingly, you do not have to spend hundreds of dollars to get good sound. Even a iPhone connected to a clip-mic can yield fairly good results with a low gain setting.
If you want to get a dedicated recorder, Zoom H1-H6 is likely one of the cheapest options. I have a Zoom H1 which I use to record sound for my YouTube videos.