@Swati Arora Thanks for posting in our Q&A.
For this issue, I have done a lot of research. The following link describes the process of Windows Autopilot Hybrid Azure AD Join.
Note: Non-Microsoft link, just for the reference.
In the "Please wait while we're setting up device for you" page, it seems that Step #3,#4,#5 will complete in this page. To find which causes this stuck situation, it is needed to check background logs. With Q&A limitation, it is better to create an online support ticket to handle this issue more effectively. It is free. Here is the online support link and hope it helpful.
Thanks for understanding.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.