Yes thanks for that, I've managed to get it working:
window.addEventListener('DOMContentLoaded', () => {
changeTarget = (link) => {
link.setAttribute('target', '_self');
}
const selector = '[href="https://www.johncervantes.co.uk/instagram"]';
const instaLink = document.querySelectorAll(selector);
instaLink.forEach(changeTarget)
});
And I'll wrap in the DOMContentLoaded if I need to add anything in the future.