LM35DZ Temperature sensors not working

The TMP35 is prone to self heating. It's customary to power it with the 3V3 source and using a 10K resistor rather than a 1K. A 0.1uF cap is more in order as well.

I'm not sure if constantly reading the TMP output would contribute to additional heating. The code in the link you referenced constantly reads A0 even though he only uses the data every 2 seconds. Only read it when you need it.

I usually take 10 samples as opposed to the 100 in that example.

It's actually 10ms.

100 temp readings are taken, and converted to a temperature, which takes about 10ms.
But only one result is used every 2 seconds for display. Weird way.
Leo..

You are definitely not stupid. Now if you did it again then .......

There are loots of fake DS18B20's out there. Library examples that depend on getting a genuine 'ROM' back from the 'B20, as in a multiple drop, one-wire configuration, won't work out so good.

(Trying to do an experiment with RaspPiPico recently I found that my 'amazon'-sourced units are fake-a-roos. All examples I've found depend on a proper 'ROM'.)

Where to buy from, reputable sources, depends on where on the Big Blue Marble you are.