Hardware logic gates for a simple demo with LEDs
The SN74HC04 has a documented output driver capability of ±4 mA when running at 5V:



Assuming you are using red LEDs with a forward voltage of 1.6V (as I measured one of mine lying around on the bench to be), then to not exceed this you need to get a resistor of:

(5 - 1.6) / 0.004 = 850 Ω


A reasonable (and safer) value would be a standard 1k resistor, which you are likely to have lying around (and if not, get a few hundred of them). That would give you 3.4 mA current through the output pin, which is in range.




  I found something very similar to my demo on YouTube ...


Yes, well, people on YouTube aren't always doing things exactly like they should. :)

See Mike Cook's tutorial The care and feeding of LEDs. As he points out, a lot of people use the wrong, or no, resistors because "it seems to work".

It may well seem to work for a while, but if you want a design that will last for a long time, you work within the manufacturer's specifications.

The problem with people disseminating wrong information is that someone will then copy it, and repeat it, and before long you find people saying "everyone does it this way".