Update your post to include full system hardware specs and OS.
Include PSU: make, model, wattage, age, condition.
Memory Configuration: RAM modules, slots in use, etc..
The manufacturer lists what is supported either in the Motherboard's specifications, User Manual/Guide, or on the applicable website.
The definitive reference is the motherboard's specifications.
Visit Dell's website and look up the spec for the OptiPlex 3010 motherboard.
Details matter.
What is supported often depends on a number of factors which may be explicit or buried in the notes and other fine print. Generally there is a listing of supported components. And over time people discover that unlisted components will work. Or sometimes that listed items do not work....
May change with motherboard version numbers. E.g., your CPU works as it became a supported component.
That may be why your build is working with 12 GB RAM when only 8 GB is supported. (Personally I am wondering about that but will set the question aside pending more details and hardware specs.)
Another consideration is the PSU. You may be able to upgrade the components but usually that increases the computer's power demands. If the PSU cannot directly provide the necessary power or if the power requirements are near peak values the build will have problems.
Again, details matter.