Hi @Anjana R
Yes, the method provided by Casey is supported by Microsoft.
The two web parts that are not available in SharePoint for Microsoft 365 modern pages are the Script editor web part and the Content editor web part. However, you could create custom web parts or migrate your existing script editor web parts to the SharePoint Framework.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.