Hi @Basim Alvi,
Please make sure “SharePoint User Code Host” service is started on your SharePoint server.
And Start "Microsoft SharePoint Foundation Sandboxed Code Service" using PowerShell:
Start-SPService -Identity "Microsoft SharePoint Foundation Sandboxed Code Service"
If the answer is helpful, please click "Accept as 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.