Below is a blog discussing database restoration with Automation. It covers the restoration process for both Azure SQL Server and managed instances
Please check if it helps in your scenario
Point number 4 in the blog- PowerShell commands to your runbook based on your Azure SQL resource type, if its Azure SQL database or Azure SQL managed instance.
Thank you!