In on premise SQL databases, it is normal to have a maintenance plan for rebuilding the indexes once in a while, when it is not being used that much.
How can I set i
In addition to using Azure Automation to automate the rebuild indexes job on Azure SQL Database, you could also consider the Automatic index management feature in the Azure SQL database, as described in this SQL Server Database Engine blog.
You can do this by going to the Azure portal, go to the Azure SQL database and then Automatic tuning. If you want this to be enabled for all your databases under a particular Azure SQL Server, you can also enable the same on the Azure SQL Server.