RAM / SSD has nothing to due with the GPU (Graphics Processing Unit). A GPU which is a specialized CPU that contains many fast cores to render graphics or perform machine learning / A.I. operations. There are two of them on the 2016 MacBook Pro. One is built-in to the Intel CPU (iGPU integrated) and the other is a discrete AMD GPU. The Mac will switch to the AMD discrete one as it is more powerful and capable but it needs a lot more power so typically only when plugged into AC power. Otherwise your battery life will be terrible.
You cannot swap the RAM nor the SSD on a 2016 MacBook Pro it is soldered to the system board. The red box is the Intel CPU, the yellow box is the AMD Radeon Pro GPU, the green box is the RAM and the orange box is the SSD. All soldered on the board.

This definitely sounds like a System Board failure. You didn't have a liquid spill in the past? Liquids can get to the system board and over time will cause corrosion and failure of the tiny components soldered to the board. The vast majority of hardware failures begin with a liquid spill or a hard drop.
It could be a cooling problem. You may need to get this 2016 MacBook Pro serviced professionally with a cleaning and re-application of thermal paste on the CPU and GPU under the heat spreader / heat pipes. Also cleaning out the fans if there is dust, pet hair inside. Run a full diagnostic over time to see if the issue is resolved or not.
Another possibility is that the GPU may need to be re-soldered and that takes a very specialized equipment and training. Apple and their authorized service centers would certainly just swap the system board completely rather than undergo the required surgery. Also, I would only trust one or two companies in the US to do such a service and it would take weeks to get it repaired.
To re-iterate, this Mac is 7 years old and soon will be obsolete so getting it fixed is a personal budget judgement call. I don't think you'll get more than another year or two out of it before you run into serious problems with being vulnerable to hackers or unable to run modern software. Once you are two macOS versions behind you won't be receiving any more security patches from Apple. Developers won't be supporting the old OS either so when they update their Apps to use the newer developer API's found in newer macOS versions the Apps will no longer work on the older macOS.
The Apple Silicon Mac's are stunningly good. They are many times faster and run much cooler than the Intel based Macs. You might be able to obtain a used M1 or a lower cost M2 such as the 13" or MacBook Air depending on your workload. If you are not doing anything CPU intensive for long periods of time, the Air is perfectly acceptable. Things like video conversions that run for 10 minutes will slow to a crawl on the Air as it is not actively cooled. The CPU will heat up under heavy load and then it will slow itself down to cool off. Most average users launch an app which takes seconds and the CPU is actually idle most of the time. Only running at peak performance for a few seconds at a time. The Apple Silicon chips do run cooler and the throttling isn't as severe as it was with Intel. But it will throttle under heavy CPU loads.