I am wondering if the following argument proves that the union of countably many sets is countable. Number each set in the union by a number of zeroes, assigning an arbitrary set $0$, the next set we pick $00$, the next $000$ etc. And then assign each element in each of the sets a number of $1$'s in the same manner- and then have an injection from this union and the set of all binary strings, by our function conjoining the set whence an element came and its position in that set to get a binary string (if an element is in multiple sets we arbitrarily pick one set and its position therein to map it to). Then this union is countable due to the set of finite binary strings being countable.
I am unsure because proofs of this statement I have seen, such as this, use an argument which is more complicated, leading me to believe there is a fallacy in this seemingly simpler argument.