Query store can be enabled on database by using the following command:
ALTER DATABASE tpch SET QUERY_STORE = ON
SQL Server/Azure SQL Database will collect information about executed queries and provide information in sys.query_store views: