You can limit who can see record names in lookup and system fields like Created By and Last Modified By to protect your Salesforce org’s data better. Users must have Read access to these records or the View All Lookup Record Names permission to view this data if you enable the Require permission to view record Names in the lookup fields setting.
How to Enable this: Under Other Settings On Sharing Settings via Setup.
Example:
On Lightning, When the Require permission to view record names in the lookup fields setting
is activated, users without Read access or the View All Lookup Record Names permission
see the lookup field labels but not the contents in the fields in Lightning Experience.
On Classic, Users who do not have Read access or the View All Lookup Record Names permission in Salesforce Classic see an underscore in system user lookup fields. The record ID is also visible in custom user and non-user lookup fields.