To create a resource group, you need contributor permissions or higher in your subscription. As a contributor, you should have the necessary permissions to create a resource group. To create a resource group, follow the steps in the "Create a resource group" section of the "Overview and Prerequisites" document.
To create a VM, you need to assign the Virtual Machine Contributor role to your account. This role provides permissions to create a VM in the selected resource group, create a VM in the selected virtual network, and write to an Azure managed disk. To assign the Virtual Machine Contributor role to your account, follow the steps in the "Grant access" section of the "Tutorial: Grant a user access to Azure resources using the Azure portal" document.
The least privilege role for creating a VM is the Virtual Machine Contributor role.
For more information on Azure RBAC and roles, see the "Tutorial: Grant a user access to Azure resources using the Azure portal" document.
References: