The HTMLButtonElement generic indicates the element the listener is attached to, but said element is not necessarily the target. See here for an example:
const handleFilterButtonChange = (event) => {
console.log(event.target);
};
document.querySelector('div').addEventListener('click', handleFilterButtonChange);
<div>
<button>click</button>
</div>
Above, the listener is attached to the <div>, but the event.target is the button, since the button was the innermost element clicked.
That's why TypeScript is giving you a warning. Use .currentTarget instead, which will refer to the element the listener is attached to:
const handleFilterButtonChange = (event: MouseEvent<HTMLButtonElement>) => {
setTerm(event.currentTarget.value);
};