Hi Vidhi Patel,
Thank you for reaching out to us on the Microsoft Q&A platform.
Please refer to the below document for the signup free Microsoft 365 E5 developer sandbox subscription.
https://learn.microsoft.com/en-us/office/developer-program/microsoft-365-developer-program
https://learn.microsoft.com/en-us/visualstudio/subscriptions/vs-m365?source=recommendations
You can register for the M365 Developer E5 subscription using the links above. Before completing the signup, please confirm the eligibility requirements. You will receive 25 user licenses if you are eligible for a free trial, which may last up to 90 days, contingent on your activities.
If you have any additional questions, please let us know in the comments. We’re happy to assist further.
If you found the answer helpful, please click on Upvote and Accept Answer. This will help other community members.