Hi,
First you need to delete the assignment(s) and after that you can delete definitions. Either of these can be at resource group scope or subscription scope depending on how you have created them.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.