Today’s Macs aren’t very upgradable, especially if they run Apple silicon: on an M1 or M2 chip, the graphics, memory and processor are all on the same, non–replaceable chip and the SSD is not user accessible or replaceable. But older Macs are much more accommodating and Intel–based Macs are relatively easy to upgrade.
With memory upgrades you’ll need to know not just the supported maximum memory but the type of RAM too and what configurations your particular Mac supports. Many manufacturers has a good memory finder for Macs.