It's a deactivation that turns into deletion. On web or app: Settings and privacy > Your account > Deactivate your account, confirm with your password. Your account then goes dark for 30 days, hidden from everyone. Log back in within those 30 days and it's fully reactivated, tweets and followers intact. Do nothing for 30 days and it's permanently deleted. So there's a built-in undo window, but the username and data are gone once it passes.
Request your archive first (Settings > Your account > Download an archive of your data) if you want to keep your tweets. It takes a day or two to generate, so do it before you deactivate.