Thank you for posting in Microsoft Q&A forum.
You can create a task sequence that installs the software in the desired order. In the task sequence, you can specify the order of installation and include steps to reboot the machine if necessary.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".