The 2nd option is theoretically better as it point to class identificator (UClass) immediately while other option searches for UClass thru reflection and asset system based on string information which takes longer.
BUT, 1st option is only option for blueprint classes, as blueprints classes don’t exist on compile time as blueprints runs on virtual machine on run time so they can not directly point out same as C++ class, you are forced to go thru this searching process.
In general if you can avoid directly referencing blueprints in C++ if possible, so your code won’t be dependent on asset path , if you have game mode blueprint you should set default pawn in that blueprint, this gonna be passed down to C++ via base class of AGameMode that blueprint is using.