Your question, while good and understandable, is a bit big.
In general, a good rule of thumb (from security perspective, not from usability) is: deny everything by default. So, don’t open anything. See what works now and if you come across something that doesn’t, then see what you need to open. And if you decide to open, open only the smallest and specified of openings (specific protocol, specific port, specific IPs, and/or networks, or even more detailed). Keep the attack vectors small, as they say.
This would be the right method although not the simplest - but there is no simple secure way. The “big” in this is, that for effective configuration, we would need to know what programs you use and how, what is your network (devices) and possibly what they do, as well as your preferences on how secure vs. convenient it should be. And then there is the proper risk assessment side if you have specific threats/vulnerabilities that you want to mitigate.
For instance, generally blocking is only concerned about connections coming/starting from outside, but there are ways to make the connection start from the inside (normally, then the firewall allows data to move both ways for that connection, like normal web browsing, but I’m referring to malicious connections opening backdoors). On top of that, common tcp&udp are not the only protocols as there are several that are needed to have a working net, so those less known ones are often overlooked and can be used to circumvent blocking (and just blocking them is likely to cripple you). This is to say, there is absolute blocking (“a wall”) but it’s more often more selective (“a door”) because data has to flow both ways.
And it’s not just about setting up the firewall (which in itself is good and commendable), as it should be paired up with setting up logging, analysis of logs and a warning message system - so that you know what is going on. But, again, only you know what is normal in your system and network and only you can set it up just right.
I think you’d do best, if you searched web for configuration suggestions and specifics, after you’ve identified what you need (and do not need). There are plenty of good sites and guides but go with the mindset that you may need to combine advice from several, because the use cases vary. And get acquainted with protocols as well, so you know what each is for.
[edit: and if/when you have several rules - it’s sometimes not said - their order is important as one may affect the others]