As a result of Twitter's (X) shift in API policy, moving from a free service to a paid one, numerous platforms and games have slowly phased out its features. PlayStation has also stated recently that as of November 13, users on PS4 and PS5 consoles will no longer be able to access or share Twitter content or link associated accounts.
If you still wish to share game screenshots and videos, you may store them by linking to the PlayStation App and then select the images or videos from Media Library to share with a simple click.