The edit feature is locked behind Twitter Blue subscription, but Elon Musk plans to make the edit free for everyone.
Currently, tweet editing is locked behind the $4.99 Twitter Blue subscription that is only available in a few countries. However, one of the changes Elon planned to do is to execute the new Twitter Blue subscription reported by Bloomberg. Therefore, Musk appears to think it is ready for everyone, and he is also preparing a major revamp of Twitter Blue, which might be released in the coming days.
In case you're not aware, Twitter Blue has long had an editing feature. Only people who have subscribed to it can edit their tweets within 30 minutes of publication. Users cannot, however, change their replies, and the feature is now only available in the United States, Canada, Australia, and New Zealand.