Thanks for reaching out to us on Microsoft Q&A forum.
As per Unit-4, In the "Determine network security group effective rules" under section "Inbound traffic effective rules" the statement "NSG inbound rules for a subnet in a VM take precedence over NSG inbound rules for a NIC in the same VM" is valid and there is no typo error.
While creating a VM a Vnet is required, but Vnet doesn't provide any opportunity to create VMs, that is why we use subnets in VN to create VMs.
NSG is attached to subnets, whatever the NSG rules we added to subnets those NSG rules are applied to only VMs but not to VN.
Inbound traffic effective rules: Azure processes rules for inbound traffic for all VMs in the configuration. Azure identifies if the VMs are members of an NSG, and if they have an associated subnet or NIC. Azure evaluates each NSG configuration to determine the effective security rules.
Network security groups are defined for your virtual machines which are placed in a subnet that is placed in a Virtual Network in the Azure portal.
As per Unit-4, In the "Determine network security group effective rules" unit, under the "VM 4" row, it states: Azure default rules apply to both subnet and NIC, and all inbound traffic is allowed is valid as per the scenario given below and attached as a screenshot provided from the link for reference.
Scenario: If there are no NSGs associated with the network interface or subnet, and you have a public IP address assigned to a VM, all ports are open for inbound access from and outbound access to anywhere.
https://learn.microsoft.com/en-us/azure/virtual-network/diagnose-network-traffic-filter-problem
Also, we can see from the below link, that the scenario what we explained is applicable for VM4 as given below:
VM4: Traffic is allowed to VM4, because a network security group isn't associated to Subnet 3, or the network interface in the virtual machine. All network traffic is allowed through a subnet and network interface if they don't have a network security group associated to them.
If the information is helpful, please accept the answer by clicking the "Accept Answer" on the post. If you are still facing any issue, please let us know in the comments. We are glad to help you.
Thank you.