Upload different codes to different Boards

Hello community.

I've recently bought a Arduino Uno and an Ethernet Shield 2 and connected them successfully to my PC. Although I could connect my SD Card to the Ethernet Shield 2 Board and the information was retrieved from the SD Card, I have one question for which I don't seem to find an answer yet.

When I upload the code, do I need to upload it to the Uno or to the Ethernet Shield?
Can I upload different codes to my Uno and Ethernet Shield? For instance a code that runs on the Uno and interacts with another code uploaded on the Ethernet Shield. In the menu Tools > Board I seem to have the option to select which board I want to upload the code to. There is also a "Ethernet" Board and I'm not sure if this is related to my Ethernet shield.

golanudelamare:
When I upload the code, do I need to upload it to the Uno or to the Ethernet Shield?

You can't upload to the Ethernet shield, it's an add-on to the Arduino. As it says on the shield's product page:

The Arduino Ethernet Shield 2 connects your Arduino to the internet in mere minutes. Just plug this module onto your Arduino Board