As answered by @diegog7, they are actually same in terms of their set cardinality.
In fact any interval over real number line can be mapped to the entire real number line using one-one functions.
For Example : (-1,1) can be mapped to R using one-one function : tan(πx/2)
Similarly, any number on real number line can be mapped to interval (0,1) using the sigmoid function.
Sigmoid function is defined as 1/(1+e^(-x)).
Using the result stated above, it is further claimed that any there are exactly equal number of reals between any two distinct reals.
Now, coming to your question about real numbers between A=[0,1] and B=[0,2] :
I give a bijection f:A-->B as f= 2x.
You can see that every element of A has been mapped to a unique element in B. Thus, proving that their cardinalities are actually equal and they had to be because they were individually equal to R.
Now, a reasonable doubt would be what if the function proposed was f=x (seems cardinality of A is less than that of B) or f=3x (seems cardinality of A is greater than that of B) .
Well, I never actually intended to define cardinality that way for infinite sets. Greater than and less than are actually much stronger relations than (greater than or equal to) and (less than or equal to) in case of infinite sets. To prove strict inequalities like A greater than B you need to show that there exists no injection from A to B.
Actually it's better to say in the case of f=x that |A| ≤|B| and in f=2x that |A|≥|B|, both of which lead to the result that |A|=|B|.
Now proving this way might seem trivial to you but this is a very important result in the study of cardinalities of infinite sets and is popularly known as Schröeder-Bernstein theorem.
Link to Schröeder-Bernstein proof https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.whitman.edu/mathematics/higher_math_online/section04.09.html&ved=2ahUKEwj1wsKC5OHoAhXr6nMBHVYrDAQQFjAHegQIAhAB&usg=AOvVaw3bIHH8zE1se3z8H_gV8O4Z