First, make sure you have Spotify installed on your computer. Then, from the top menu of the Xbox Game Bar, click on "Settings -> Widget menu" and click on the "+" button to add Spotify to the Game Bar.