Thank you for reaching out to us. Would like to understand the issue in detail.
Do you have Azure AD Connect setup ? where you can sync custom attributes ?
Reference:
https://learn.microsoft.com/en-us/graph/add-properties-profilecard
https://janbakker.tech/enrich-microsoft-365-profile-card-with-extensions-and-custom-attributes/
https://support.microsoft.com/en-us/office/profile-cards-in-microsoft-365-e80f931f-5fc4-4a59-ba6e-c1e35a85b501
Let me know if you have any questions.