Hello @MezarZakarya-9086
Welcome to Microsoft Q&A Platform,
NSGs can be associated to network interface or subnet level, not the entire vnet.
You can use the same NSG with several network interfaces or subnets.
For reference: https://learn.microsoft.com/en-us/azure/virtual-network/network-security-group-how-it-works
I hope this helps!
----------
Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.