The church General Handbook section 32.14.9 says that you can resign your membership "by sending a signed, notarized request to church headquarters".
This process requires you to post a physical letter or email a scan or photo to the church Member Records Division. Legally you stop being a member the moment they receive your resignation request.
If your letter is notarized, the church office will process your request without your local bishop or stake president needing to do anything. Most people receive a letter confirming their resignation within a few weeks.
If your letter is not notarized, the church office will forward your request to your local bishop to process. See this page for how that works.
The address to send a physical letter is:
Member Records Division, LDS Church
50 E North Temple Rm 1372
SLC UT 84150-5310
Resignation emails should be sent to email@example.com
The email address previously used is firstname.lastname@example.org
Emails shared by individuals on r/exmormon dated August 2022 from the church now give the following advice:
"To resign your church membership, please send a written request, including your full name, date of birth, and current physical address by email to email@example.com. If you wish to expedite your request, please have your written request notarized. If notarized, your resignation will be completed upon receipt. Otherwise, the process can take up to 60 days."
It is believed that the 60 day waiting period for emails that are not notarized will include the church headquarters reaching out to local leaders to confirm your identity, as well as their usual 30 day cooling off period for resignation requests.
Legally in the USA, once a church has received and acknowledged your resignation request you are no longer a member. Our recommendation is to reply to any communication from the church that requests a notarized letter reminding them of this fact. It is not known at this stage whether that leads to them processing resignations faster, bypassing contacting local leaders, or no change in their internal ways of working.