If you restrict traffic at the VM itself you can minimize the costs and utilization for traffic going to Azure FW and then getting dropped. However, if its easier for you to do it at the firewall for ease of management, you can do so. Therefore, it depends upon the use case and the requirement but traffic can be managed at both the firewall and the NSGs using IP/ports.
Please let me know if you have any more questions and I will be happy to help :) Thank you!
Remember:
Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
Want a reminder to come back and check responses? Here is how to subscribe to a notification.