When you are first introduced to the "size" of a set, you are told "sets have the same size if there's the same number of elements in them," which is fine as long as there's only finitely many things! When you say "the set $A = \{a,b,c,d,e,f,g\}$ has seven elements" what you really mean is that "there is a bijection from $A$ to the set $S_7 = \{1,2,3,4,5,6,7\}$". Here, you can read "bijection" as meaning there is a way of labelling each element of $A$ with an element of $S_7$ in such a way that every element of $A$ gets a label and every label gets used somewhere.
When we talk about a set $B$ being infinite (i.e., not finite) what we mean is that there is no way of labelling elements of $B$ with a finite set $S_n = \{1,2,\dots,n\}$. But we still want to know how to talk about sets having the same "size" (or perhaps the same "size-complexity" as mentioned in the comments) so we come up with a way to generalize the finite-context definition into a broader setting.
With that in mind, "bijections" become a useful way to describe whether sets have the "same size." It's a tool that works in the finite setting, but it doesn't inherently rely on any notion of "finiteness". We can talk about there being a bijection between $X$ and $Y$ without ever knowing whether $X$ and $Y$ are finite or not. All we need to know is whether we can use elements of $Y$ to label elements of $X$ in such a way that every element of $X$ gets a label, and every label from $Y$ is used.
Since you're in high school, I don't expect that you've seen what a "bijection" is, so this answer may not be very satisfying, but hopefully there's some insight you can glean here. (Edit: just realized you used "bijection" in your post, so ignore this last line! Well done diving into these deeper ideas already!)