1. First disable dynamic checkout button by going to theme customiser -> product page -> sections -> product pages -> uncheck Show dynamic checkout button
2. Go to online store -> themes -> select theme -> actions -> edit code -> product- template.liquid file under snippet folder.
3. Add checkout-x-buy-now-btn to the following code, please see the screenshot below: