When considering compatibility with graphics cards, motherboard and power supply compatibility is primarily important; for RAM, capacity and speed (frequency) are the main considerations.
If you want to upgrade your graphics card, it is important to select the appropriate graphics card considering the model of the graphics card you are currently using, the capacity of the power supply, and the connection interface (for example, PCIe).
RAM 8GB, 8GB -> 16GB