You're going to have to be a little creative and find a way to isolate and identify the source of the rattling. Are you sure it's a rattling and not a humming/buzzing sound? If it's the latter then your system is suffering from coil whine. Even so you're going to have to investigate and find the source of this whine. FYI, coil whine can come from the motherboard's power delivery areas, from the back of a GPU and the PSU as well.
As a precautionary measure, please pass on your full system's specs inclusive of your OS. List them like so:
CPU:
Motherboard:
Ram:
SSD/HDD:
GPU:
PSU:
Chassis:
OS: