In time signature, is the duration of a bar a fixed amount of time (like for example 1 second) or is it completely arbitrary? If the latter is the case, I don't see how time signature has any meaning at all since you can make 3/4 and 4/4 sound the same just by extending the duration of a measure/bar, putting the same amount of beats in the same amount of time.
A time signature tells you two things in a concrete obvious fashion 1) the number of beats in a measure and 2) what note gets a beat.
For example in 4/4 there are 4 beats and the quarter note gets a beat. In 3/8 there are 3 beats and each one is an eight note.
To your point if you play a song in 4/4 very fast it will take less time than a bar of 4/4 played very slowly. This is why songs usually also have a tempo marker of some sort, either written out like quarter = 120. Or with some other less exact way like “allegro” or “fast”.
Now to your second question. Why can’t we just write a song in what ever time signature and play it at the tempo that works for that song so we play the same number of beats per minute. Well that is because the time signature also tells you stuff that is less obvious. It tells you the strong and weakly stress beats of a measure.
So, in 4/4 the down beat (beat 1) is the strongest beat. 3 is also strong but not as much and 2 and 4 are weak.
In 3/4 again, 1 is strong and 2 and 3 are weak. This is a main reason we write songs in different signatures.
Another is ease of reading and playing. If we can hear the strong beats and feel them it will be much easier to read along while playing and know where in the measure you are. If the strong beat starts on 1 and then is on 4 and then in the next measure is on 3 and then 2 you can easily get lost while reading along. This would be the case if we wrote in 4/4 but were playing a song in 3/4.
Time signature has nothing to do with seconds or time. In German we say Takt: 3/4 Takt or 4/4 Takt (this means beats/measure or bar.
(The term "time" was confusing to me when I started working with notation programs written in English.)
To (over) simplify, the time signature tells us how many beats there are until the next strong beat. A march goes ONE two, ONE two (think LEFT right, LEFT right). So 2/4 would be an appropriate time signature. A waltz goes ONE two three, ONE two three, so 3/4. Much rock music is in 4/4 - that's ONE two three four, ONE two three four.
These are beat counts, not absolute timings. There are slow marches and quick marches, slow waltzes and faster ones.