We can simply enable or disable the windows firewall by going to the security settings, but for more specific stuff, we need to go to the Advanced Firewall options, where we will get a list of options to change from
Open Windows Defender Firewall and select Advanced Settings in the sidebar. Switch to Inbound Rules via the Getting Started page or the sidebar-> for InBound Connections
Open Windows Defender Firewall and select Advanced Settings in the sidebar. Switch to Outbound Rules via the Getting Started page or the sidebar-> for OutBound Connections