Xbox Game Bar can take screenshots, too. And it allows you to share captures to Twitter directly. Before recording, you should go to the Settings app to enable Xbox Game Bar and turn on the Game Mode. Also, you can make some settings for your captures.