Clicks in Audio when Sound Goes Quiet While Recording

An example of my issue:
Audio.jpg
I am using Audacity 2.3.3 on Windows 10. When I record sound on my computer through and AUX cable, there are clicks in spots in the recording where no other sound was coming in (quiet spots in the recording). Apologies if this is a basic issue, I tried searching the forum, but I do not know the proper terminology to describe what is happening.

I’d guess electrical noise is getting into your soundcard. It has the shape of a static discharge and sometimes it’s positive and sometimes it’s negative…

Does it happen when the Aux cable is unplugged? Maybe it’s coming from whatever you’re recording from?

…And, It’s probably happening when there is not silence but maybe you’re not hearing it.

A larger disturbance with the same general shape will happen when I unplug the AUX suddenly. I also have extended sections (multiple hours) with quiet spots where it does not happen at all. Is there anything I can do to mitigate this or remove it with audacity? I can’t easily change the device I have for recording.