Before you switch
• Check what WordPress recommends: its requirements page says PHP 8.3 or greater, and its compatibility table marks 8.3 and 8.4 as supported from WordPress 6.7.
• Back up the database and files, and make sure you can switch back. If your host lets you pick the PHP version, note which one you're on now.
• Save a "before" copy of your key pages: home, shop, a product, cart, checkout. Status code, page size, and whether the page ends properly.