Uncaught TypeError: Cannot read properties of undefined (reading 'remove')

JavaScript is case-sensitive

Change
classlist to classList (lL)

elem.classList.add('hide');
elem.classList.remove('hide');