- Current-limiting resistors
- The resistor divider (two resistors between e.g. 3.3V and GND. The point between the two resistors will be between 3.3V and 0V, depending on the resistor values. Sometimes you need a certain voltage. For example to bias transistors.
- Delays, using a resistor and a capacitor. The values will determine the delay.
- Capacitors next to oscillators
- Filters, using a resistor and a capacitor. The order and the values will determine the cutoff frequency.
- Most capacitors on a PCB probably sit right next to a chip. Often, at least one per chip. They get rid of noise already on the line, and act as short-term energy storage for the chip next to it.
- Decoupling capacitors to get rid of the DC component of a signal (i.e. if there is a signal fluctuating between 4.5V and 5.5V before the cap, it'll be -0.5V and 0.5V behind the cap. Often, you need to add a DC component and later remove it, so that's two capacitors already.
There are some good YouTube channels that go into this. EEVBlog[1] has made a lot of really nice videos about the fundamentals, as has w2aew[2]. And I found MicroType Engineering[3] to be a good source of practical information on designing circuits.
Capacitors next to ICs are almost always for decoupling[4]. Similar to how the cistern in your toilet provides a large amounts of water in a short amount of time without affecting the water pressure in the rest of the house, hence decoupling the local water flow from the main supply, decoupling capacitors can supply a lot of current for a short amount of time.
However what values to use can seemingly be a bit of a black art[5], not helped by the fact there's so much outdated information and rules of thumb out there from the days of through-hole components which just doesn't apply to modern surface mounted components (like needing multiple different values).
On the other hand, resistors on a data line can be there to protect against ESD events[6], for example.
Some of it might be a bit more advanced than what you need right now, but there's definitely some good stuff for people starting out. If for nothing else highlighting areas you should be aware of.
[1]: https://www.youtube.com/@EEVblog/playlists
[2]: https://www.youtube.com/@w2aew/playlists
[3]: https://www.youtube.com/c/MicroTypeEngineering
[4]: https://www.youtube.com/watch?v=BcJ6UdDx1vg
Also, I'll recommend the "Follow the example" approach of just looking at the data sheets for various components and modules. Especially stuff like the Arduino Uno - It's got a microcontroller, and then everything around it is just support. You start to see patterns where there (for example) a 10uF and 0.1uF Capacitor around power inputs. And they're everywhere so even if you don't know why (yet) you do know that you need capacitors around power inputs.
https://wiki.ai03.com/books/pcb-design/page/pcb-guide-part-1...
https://youtube.com/playlist?list=PL3bNyZYHcRSUhUXUt51W6nKvx...
I think the hardest things for me so far been (a) getting my head around the idea that everything in a circuit is happening all at once (rather than iteratively like an algorithm) and (b) "input" and "output" are convenience terms, e.g. an opamp can sink current through its "output". Both of these insights have come from seeing real circuits analyzed on YouTube.
You can also see a nice progression there from beginner PCBs to more advanced things.