@sakuraime Thank you for reaching out.
The time taken for rebuilding indexes depends on the size of the index and available compute (DTU's).
Azure SQL tries to rebuild the index in a way that utilizes minimal system resources while allowing read/write operations on the table.
With Azure SQL Database, you don't need to do rebuild indexes frequently unless you see an extremely high fragmentation.
We have provided more details on this post.
If an answer is helpful, please "Accept answer" or "Up-Vote" for the same which might be beneficial to other community members reading this thread.