Get your demo app id
You can get your demo app id using steamworks, or using Steamdb using the search bar, in the results:
Open steam console
To open steam console, type steam://open/console in your browser adress bar
Install game demo using command
app_install DEMO_ID while replacing DEMO_ID by your app id, for example
Have fun !
You should now have both game and demo in your game library ! (And it will update as a normal game)