How do you add a custom social profile in Contacts on macOS?
While tedious and a little annoying, you can export the contact card, edit it manually in a text editor, and then import it back into contacts.
Select on the contact you want to change, then go to File → Export → Export vCard…. Open the vcf file in a text editor such as TextEdit.
You’ll see a file that looks something like this:
BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//Mac OS X 10.15.6//EN
N:Last;First;;;
FN:First Last
END:VCARD

To add a custom social profile, add this before END:VCARD, replacing Service with the social profile service (e.g. Twitter) and username with the contact's username:
X-SOCIALPROFILE;type=Service:x-apple:username

To use special characters, such as : or ;, in the service, put it in quotation marks (&quot;). (To use a &quot; use ^&quot; and use ^^ for ^.) However, these will not display correctly and show up as “profile” in the Contacts app.
To use special characters in the username (including spaces), use the URL encoding.
For example, if you want to add the username “first_last123” for the service “Foo bar”, and the username “with space” for the service “Special:characters&quot;^”, the file may look like this:
BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//Mac OS X 10.15.6//EN
N:Last;First;;;
FN:First Last
X-SOCIALPROFILE;type=Foo Bar:x-apple:first_last123
X-SOCIALPROFILE;type=&quot;Special:characters^&quot;^^&quot;:x-apple:with%20space
END:VCARD

You can now import this VCF file into Contacts.

Alternatively, you could use AppleScript:
tell application &quot;Contacts&quot;
  -- theContact is a contact
  make new social profile at theContact with properties {service name:&quot;Service&quot;, user name:&quot;Username&quot;}
  save
end tell

Here's a script you could run to add a custom social profile to the selected contact:
tell application &quot;Contacts&quot;
    set selectedContacts to selection
    if (count selectedContacts) is not 1 then
        display alert &quot;Please select 1 contact to modify.&quot;
        return
    end if
    set theService to (display dialog &quot;Service?&quot; default answer &quot;&quot;)'s text returned
    set theUsername to (display dialog &quot;Username?&quot; default answer &quot;&quot;)'s text returned
    make new social profile at selectedContacts's first item with properties {service name:theService, user name:theUsername}
    save
end tell