So I am working on my retro build and planning to install 2 soundcards (once I manage to properly install and set them up). But the thing now is I need a simple way of connecting the two sound cards to one speaker. Is there a cable I can use to realize that? I do not want to use plug the speaker cable into one or the other soundcard when I use them. Also I do not want to use a mixer or anything like that. I am thinking about a cable like the 3,5 mm Y cables to connect two headphones on one device for instance.

You can also build a passive mixer to prevent the cards from driving each others low impedance outputs.
The basic idea is that you add series resistors to all outputs before you join them.
Because it's just one or two resistors (mono or stereo) per output, you could technically hide them inside the plugs and build some kind of "passive mixer cable".
Needless to say, the resistors will attenuate the signal, as well, because they effectively build a voltage divider with your amplifier's input impedance, so you'll have to adjust the volume, accordingly.

^ Do that. Don't connect multiple outputs directly to each other. For line-level outs, it's... probably... okay... most of the time... since the outputs normally have a 100R resistor or such in series with the output, to protect it from shorts, but if you have card A driving a full positive signal and card B driving a full negative signal, that's actually worse than a short to ground (halfway between the two extremes.) Amplified outputs may or may not tolerate it so well.

Thank you guys for the input! I am not so accomplished with all these electronic components so that I could build something of my own and would feel comfortable using.
I tried line-in and line-out but the sound was really not pleasent to listen to. I guess the simplest way to realize that is still a mixer (though I wanted to avoid that).

would it not better to couple them over a opamp with some sort of summing amplifier ?

i tried that with resistors and the impact on sound quality with only resistors is hear able.
i simply would purchase a cheap stereo mixer ^^

What do you think happens in the mixer? 😉 To sum inputs, you isolate them with resistors, then buffer the result with an op-amp (or discrete amplifier if you're into hand-selecting transistors, etc.). With a "passive" mixer, you .... isolate the inputs with resistors, then feed it to your speakers. The first stage of which will be a buffer amp. That's basically a mixer.

The variability comes down to -- what R values did you choose? What's the input topology of the speakers? Is there a DC-blocking cap? (hint: yes, there is) What's its value and its effect on the bandpass filter you've just created?

Basically, you can try 1K, 10K, 22K resistors and pick the combination that works best. If you were going to design a fancy mixer, you might buffer the individual inputs straight away, then mix them (with resistors -- always with resistors), then buffer again. This helps you eliminate any variable interactions. But, many cheap mixers do not go to such lengths. (E.g., common Rolls utility knife boxen and such -- they just use resistors followed by potentiometers followed by a buffer amp.)

What I did back in the day when I had an ISA card for DOS and a PCI card for Windows was build a simple switch box to switch between the outputs of the two cards.

All it was was a small aluminum project box with 2x 3.5mm female plugs on the one side of the box and a single 3.5mm female plug on the other side of the box The switch was mounting in the middle top of the box.

I labeled DOS on one side and WIN on the other with one of those labelers that you had to change the letter, pull the trigger, and then change the letter, etc.

Pretty sure the ground was common between everything and the switch was a 2-pole toggle switch.

Switchboxes are a lot cheaper than mixers. I use multiple mixboxes to do exactly this (although the cards are in different computers), and the output of multiple midi modules. If you search for "4 PORT Manual Switcher box Sharing 3.5mm STEREO Selector" on a certain auction site you see what I have...although I only paid around $10 for it I think.

^ Do that. Don't connect multiple outputs directly to each other. For line-level outs, it's... probably... okay... most of the time... since the outputs normally have a 100R resistor or such in series with the output, to protect it from shorts, but if you have card A driving a full positive signal and card B driving a full negative signal, that's actually worse than a short to ground (halfway between the two extremes.) Amplified outputs may or may not tolerate it so well.

I get ya, but I can say with near 100% certainty that the outputs from the sound card already have DC-blocking caps, as does the speaker's line input. 😀 No need to add them in a passive mixer. It would just have a potentially negative effect on the filter poles.