91971187, I see that you are working with Azure Portal Dashboard, where you have pinned the query from a LA workspace as mentioned in this article - Create and share dashboards of Log Analytics data
With Azure Portal Dashboard, there is no way to get the parameters in the query at the moment. The duration is specified based on which the tile shows the output of query and timeGrain will have to be hardcoded in the query as also shown here - Visualize a log query.
Note that the suggestion provided above to use parameter names with "_ (underscore)" are for Azure Data Explorer dashboard which does not apply to Azure portal dashboard even when the queries being used are KQL.
Apologies for the inconvenience. I would suggest posting this as an idea to the Azure Portal Feedback Forum for consideration by the portal team.
I am also reaching out to Azure portal dashboard team to see if I can get additional details about it.