My problem is when i click tap only first tap is working when i click another tap is show error
Uncaught TypeError: Cannot read properties of undefined (reading 'classList')
So when you call
let panals = document.getElementById('panals')
It will return the first element with an id of 'panals', regardless of which panel you click on. This will be the 'John' panel. So when you click on 'Anna' and try and do
panals.getElementsByClassName('Anna')[0]
it will return undefined because panals will always be the John panel.