with joomla v3 we use the following code to get values from database
//
$userfields = FieldsHelper::getFields('com_users.user', JFactory::getUser(), true);
return $customFields[6]->value;
//
now with joomla 4 we faced this error Class 'FieldsHelper' not found
return $customFields[6]->value;
? It seems to be completely unrelated to your question focus.use Joomla\Component\Fields\Administrator\Helper\FieldsHelper
at the top of the file as described in The Forum?