Hi @Vishu ,
Please check if below blogs could help you.
Collect and store historical SQL Server performance counter data with DMVs
How to analyze SQL Server database performance using T-SQL
This is an old thread Creating SQL Server Performance Baseline Monitoring, hope it could help you.
If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.