You need to find out what resources are bound to the VPN Gateway that you're trying to delete. These could be virtual networks, subnets, local network gateways, connections, etc. Once you've identified the dependent resources, you should unbind them from the VPN Gateway or delete them if they're no longer needed. Be careful with this step as it might impact other services or applications. After all dependent resources have been unbound or deleted, you should be able to delete the VPN Gateway.
I have added the link that shows you how to delete
https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-delete-vnet-gateway-portal