See the codepen: https://codepen.io/JSsnippets/pen/qBbyMoJ
const pasteBox = document.getElementById("paste-no-event");
pasteBox.onpaste = (e) => {
e.preventDefault();
return false;
};
Source
https://github.com/roeib/JavaScript-snippets#preventing-paste-into-an-input-field