This article explains how to permanently delete your X (formerly Twitter) account from the platform using the deactivation process. It also explains how to hide your posts during deactivation.
How to permanently delete a Twitter (X) account
The only way to delete an X account is to leave it deactivated for 30 days. At that point, the platform will completely remove the account from its system. Once deleted, all of your posts will leave the servers permanently. You can hide your feed before taking the steps to deactivate the account.
To delete your account, start by logging in and following these steps:
Select More from the list on the left side of your profile.