Where should I connect my modem in this ethernet junction box?
You can't use those black boxes. They are for distributing telephone lines, not Ethernet.

You have two options.

The first is to put RJ45 connectors on the ends of the blue cables. You'll need to buy (or borrow) an RJ45 crimp tool and get some RJ45 connectors. You can crimp on the connectors to all of the blue cables, or just the ones you intend to use. Make sure the connectors you use are compatible with solid core wire.


PROS: Probably the simplest method.
CONS: Doing an acceptable job of crimping on the connectors takes a bit of experience.


The second is to buy a small patch panel rated for Cat5e. A patch panel looks similar to those black boxes you have now, except that next to each place where the blue cable is connected, there is an RJ45 jack. You'll need a punch tool for this. Some panels or bags of jacks come with a small plastic punch tool which works just fine, but it takes a bit of extra work.


PROS: Arguably easier than crimping on connectors.
CONS: Takes up more space.


Once you have completed either of the above, you can then connect the cables or the patch panel to your modem or a small Ethernet switch.

Also, you will need to examine the wall plates. The jacks the blue cables are connected to will need to be Cat5e rated or better, and the blue wires need to be connected properly. Frequently this is not done correctly by the initial installer.