Bellow is a step by step how to restore AdventureWorks sample database provided by microsoft.
Download Adventureworks.bak file
go to this AdventureWorks sample databases – SQL Server | Microsoft Learn scroll down and choose the version of bak file that matches your sql server instance installed in your machine. To know what specific version is running, run this statement in ssms :
select @@version
Restore .bak file
once downloaded, open SSMS click restore database and choose the .bak file as device.

Check sample database
run one or two select statements to check the data

now that you have a working sample database, you can continue exercising sql queries or use it as database for your sample application. There are other sample database that you can use, more on this github repo sql-server-samples/samples/databases at master · microsoft/sql-server-samples · GitHub