version 2.0.21 OS Windows XP
There is no “hardware playthrough” setting in the menu or it does not work for me.
“Software playthrough” gives a very loud rattling sound. Turning down the volume reduces the volume but does not remove the rattle.
How can I monitor while recording?

The “Hardware Monitoring” option only applies to the Mac version of Audacity.
On Windows, go into the sounds control panel and enable playback of the input that you are using. This is not available with all sound cards but most sound cards on XP allow you to do that.

I did activate playback of the input, but I get this terrible rattling noise as ezplained before.

You said software playthrough rattled, but if you unmuted your input in the playback side of Sounds and Audio Devices you don’t need software playthrough - turn it off.

If you were recording from stereo mix in error, software playthrough would give loud feedback echoes. Look in Audacity Device Toolbar to ensure you are recording from the input you connected to the computer and not from stereo mix.