In short, you pay everything in advance. To make clearance quicker, iHerb charges taxes and import fees on the checkout page, which means the courier will not ask you for money at the door.
Website prices already include the 15% VAT, as they have since March 2021. Since October 2024, customs service fees have also been added at checkout, in line with a ruling from ZATCA, the Saudi authority for zakat, tax and customs.
According to iHerb's help center, the Riyadh warehouse sits within a special economic zone. As a result, orders sent from there still count as imports, so the fees and restrictions of Saudi customs apply to them.
Source: iHerb: VAT and customs on the Saudi Arabia shipping page