If you have one of the following Mac models, you cannot upgrade the RAM (in some cases, such as the 2018 Mac Mini, it is possible but quite difficult): The below Mac models have user-upgradeable RAM:
We wouldn't recommend trying this unless you're extremely experienced with electronics and your machine is already out of warranty. Some newer iMacs technically have user-upgradeable RAM, but doing so requires extensive teardown of the machine. Recent MacBook Pro and MacBook Air models have the RAM soldered to the motherboard. Unfortunately, most modern Macs don't allow you to upgrade the RAM yourself.