Hello, Welcome to Micorosoft Q&A,
implementation mechanism for XBOX Game Bar integration to UWP app
For this scenario, you could refer to Game Bar Widget Overview document, The Xbox Game Bar Development Kit allows you to build widgets for Xbox Game Bar. An Xbox Game Bar widget is a Windows UWP XAML app that has a XAML view rendered into Xbox Game Bar's UI. For detail steps please refer Development Guide. This is official code sample that you could refer to.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.