How to get info about which GPU and CPU player has in C++?

I want to make plugin that gets me info about which CPU player is using and GPU (Including how much VRAM it has), but im not sure how would i get info about that in C++

You can get them from WindowsPlatformSurvey.cpp or IOSPlatformSurvey.cpp
inside of
\Engine\Source\Runtime\ApplicationCore and the specific platform folder

You could probably try to access it through the abstract layer of
ApplicationCore/GenericPlatform

Unreal also has a benchmark tool built in to set optimized settings based on hardware.