I'm confused about the distinction between using querySelector() and getElementById(). From what I understand, querySelector is able to retrieve an element using any selector, giving it more flexibility.
Are there additional contrasts between the two methods? In what scenarios would it be more appropriate to use getElementById instead of querySelector?