Hi @Sridhar Shankar,
You could use following script to stop drag and drop in sharepoint online
ExecuteOrDelayUntilScriptLoaded(function() {
g_uploadType = DragDropMode.NOTSUPPORTED;
SPDragDropManager.DragDropMode = DragDropMode.NOTSUPPORTED;
}, "DragDrop.js");
If you are using sharepoint modern page, you could create web parts with the SharePoint Framework SPFx or download samples from github at https://www.sharepointpals.com/post/step-by-step-procedure-to-add-a-js-file-to-all-pages-in-a-spfx-modern-pages-using-sharepoint-framework-extension/ where there are instructions for downloading and installing them.
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.