HTMLElement
is the type of the dom element. You are using that type for a parameter of a callback for an event coming from the dom element. Those aren't the same thing.
Try:
const handleOnClick = useCallback((ev: React.MouseEvent<HTMLElement>) => {
console.log(ev.currentTarget);
}, []);