How to change Add to cart to Great choice button label on Click?

1. Go to Shopify dashboard -> themes -> Edit code

2. Open buy-buttons.liquid

3. Paste below CSS code at the top of file:

<style>
.good-choice::after {
  content: "GREAT CHOICE🎉"; /* Write you own button name */ 
  text-indent: 0;  
  display: block; 
  line-height: initial; 
  padding: 13px 0px;
  text-transform: none;
  align-content: center;
}
</style>

4. Paste below JS code at the bottom of file:

<script>
function goodchoice(btnId) {
  let goodChoiceBtn = document.querySelector(btnId);
  if(goodChoiceBtn != null) {
    console.log(goodChoiceBtn)
    document.querySelector(btnId).classList.add('good-choice');
    document.querySelector(btnId + ' span').style.display = 'none';
  }
}
</script>

5. Add below line of code in button tag:

onclick="goodchoice('#ProductSubmitButton-{{ section_id }}')"