The “-2” is being added because there are duplicate pages for “Compare” and “Checkout” in the Pages section of your WordPress site. To resolve this, navigate to Pages in your WordPress admin, locate the duplicate pages, and delete them.
Once the duplicates are removed, the URLs will revert to their original format.