There are many different factors to take into consideration when selecting electrical components to put into a project. These include:

Price

The most obvious factor, make sure whatever you are buying is in your price range. Most components tend to be very cheap (a few cents per component to a few dollars), making it a good idea to buy them in bulk to reduce the amount of money sent on shipping costs. More specialized components, however, can be more expensive, ranging up to hundreds of dollars.

Size

You need to make sure that whatever component you select will fit onto your circuit board. If you are buying components for a PCB, for example, make sure that the PCB is modeled around those components. As a general rule, the higher power the component is, the larger it will be.

Mounting Type

Components come with all different kinds of mounting structures, such as through-hole, surface-mount, etc. Most components you have used so far have likely been through-hole components (there are two metal rods emerging from either end of the component that can be plugged into a breadboard or soldered onto a PCB). However, if you're looking for a cleaner, more compact design, surface-mounted components could be beneficial to look into for PCBs.

Lead Time

If components are not in stock, there will be a timeframe on the page that says "Lead Time". This is the amount of time it will take to manufacture and ship out more of these components. Most components have a lead time of at least a couple of months, so if a component is out of stock and has a long lead time, it may be more beneficial to try and find another option.

Power Rating

The power rating will dictate how much voltage and current can travel through your component. If you need your component to be able to handle 200V DC, make sure you look for that. If you need your component to be powered by a 12V DC battery, make sure you don't choose a component that has a lower maximum voltage rating. The power rating(s) of your component(s) will dictate both what components and what power sources you can use.

To find components, usually just searching the object you need should suffice (ie "50V 10k resistor"). Some good sites to buy components off of include Mouser, Digi-Key, Adafruit, etc.