How to know the part number that I want?
You take your requirements, your specs, and enter them into a parameter search on an electronic part distributor like Digikey or Arrow or any local one. You can search by voltage, resistance, wattage, and any number of different requirements.

For example, in the Logic Gate (Single Function) category for Digikey:



You can filter by Manufacturer, Packaging, Series, Logic Type, How many gates in a single IC, how many inputs, if it's a Schmitt Trigger, Voltage range, etc. You can filter by many different specs that suit your needs.

At that point, it narrows it down, and you can pick one based on price or other features. They also tend to link to datasheets so you can confirm it works as you need.