How to scale camera distance with mesh size?

I am trying to learn how to code in EU5, first ever game engine or API, and I made a pawn that is the default player and what I wanted to do is set my camera relative location scale with the size of the asset that I load. I believe my mistake is getting the radius of the sphere of the component. I don’t really understand how Transforms and getSphere works and I can tell that’s my issue. I tried to do it with this code.
v----------I tried many getTransform commands
FTransform Trans = CameraMesh->GetComponentTransform();
CameraMesh->UpdateBounds();
float Radius = CameraMesh->CalcBounds(Trans).SphereRadius;

//setup camera
Camera->FieldOfView = 120.f;
Camera->SetupAttachment(CameraMesh);
Camera->SetRelativeLocation(FVector(-100.f - Radius, 0.f,Radius + 50.f));

All my pawn does is move around and I haven added a mouse look around function but I am still learning.

If you want to position your camera further away from the character based on the size of the character, you should attach the camera to a spring arm component. The spring arm component has a length property. Besides that, the spring arm can handle camera collision with environment nicely.

You could calculate the size of your character by the size of its Collision capsule or collision bounds.