As the ID and class create dynamically so my best approce the xpath as bellow

driver.findElement(By.xpath("//button[@data-cookiebanner='accept_button']")).click();

By toihid