Its easy. This link
https://www.irs.gov/pub/irs-pdf/f4419.pdf
takes you to Form 4419 which is the Application for Filing Information Returns Electronically (FIRE). Question 7 on Form 4419 asks you to select which forms you are efiling. Select 1042-S and any other forms. The TCC number to efile 1042-S forms is different from the TCC number to electronically file the 1099 or W-2 or 1095 forms. Fill the form out and then mail to:
Internal Revenue Service
230 Murall Drive, Mail Stop 4360
Kearneysville, WV 25430
Or fax using one of the below numbers:
(877) 477-0572 (within the U.S)
(304) 579-4105 (International)
I recommend faxing and not mailing. Mail is slow. The IRS typically emails or calls or faxes back the TCC number and then mails the transmitter control code as well, but the mail takes many weeks to arrive.