Thank you @slash1andy. The problem was resolved after changing the product permalink to Default. Also, the padding problem is also sorted under (Customizing ▸ General Options
General Settings) and maxing our “Main Character Width”.
@fhaps Thank you for your reply. I actually do not have a theme developer and I’m doing this solo. I’m using OceanWP as a theme with Elementor and woocommerce.
I’ll try taking a backup and changing the theme.
Yesterday, another issue also cropped up. While adding a product, suddenly the single product page stopped working and started showing 404 Page not found.