Why does my computer make a screeching noise when Notepad++ is open with NUL characters?

As mentioned in the comments to your question, this is almost always caused by overdriven and/or dying power components (capacitors, inverter, etc.) in your monitor.

I have seen this happen most often on Dell monitors from the BadCaps era. It almost always signals (in my experience) that the monitor doesn't have much useful life left. On these failing monitors, the noise is usually followed (in a few months) by blurring of any long lines of black (such as rows of text), and then followed by the monitor remaining black even when it is powered on and has a signal.

The reason that it is specifically with Notepad++ showing these non-printing characters is because the non-printing characters create an image very similar to the horizontal bars on the ScreenTunes page.

As an experiment, see if the sound changes in either volume or pitch if you change the font size in Notepad++.