waitForSelector timing out even tho the element is on screen

I’m building a checkout bot and I’m haveing truble geting past one of those dumb “enter your phonenumber for text” pop ups that sites do, the element I’m telling the bot to click is appering on screen but the bot wont click it. This is my first project ever on javascript and I have no Idea what I’m doing, I’m kinda taking the learn as you go aproach to coding right now and I’m learning a lot but Im really stuck here and I cant find what I am doing wrong.

async function regectingnumber(page) {
    try {
        console.log("Rejecting number")
        //await waitForTimeout(2000)
        //await page.setDefaultNavigationTimeout(60000);
        console.log("waiting...")
        await page.waitForSelector('button[class= css-10e85z4 errp0sa0]', {timeout:60000})
         console.log("waiting...")
         await page.evaluate(() => document.getElementsByClassName('button css-10e85z4 errp0sa0')[0].click());
        console.log("Number entered!");
        //await page.click('button[class="css-yq30jm e5ippug0"]');
        //console.log("Number rejected!");
    } catch (err) {
        console.error(err);
    }
}

this is just a small part of the code the part that im specifcally getting a error on because it wont let me post the full thing without calling it spam