Hey Iwin,
I’d recommend double-checking your shipping rates settings.
https://help.shopify.com/en/manual/shipping/setting-up-and-managing-your-shipping/setting-up-shipping-rates
If you’re doing price-based shipping rates, then you’ll need to make sure you have a fully inclusive list of rates.
They should look something like this:
$0-100 = $10 shipping
$100.01 - $200 = $20 shipping
$200.01+ = $30 shipping
… where there are no gaps in pricing, between the different rates offered.
If your rates have any ‘gaps’ in them, like this:
$0-100 = $10 shipping
$101 - $200 = $20 shipping
$201+ = $30 shipping
… then if an order is $100.50 for example, then there will be no shipping rates available at checkout. In the above example, there are ‘gaps’ between $100-$101 and $200-$201 (the ‘cents’ matter in this case, and it could be more drastic than just cents if your current rates are even more spread-out).
It’s also important that you have an ‘end rate’ (like the “200.01+ = $30 shipping” from above), so that if someone is trying to place a larger order, they’ll also see a rate to select.
If your rates were like this:
$0-100 = $10 shipping
$100.01 - $200 = $20 shipping
… then if someone placed an order that’s over $200 (ex. $215) … then they wouldn’t see any shipping rates to select at checkout. So you want to make sure you have a $X+ rate at the very end, for larger orders.
Lastly, you’ll also want to make sure you have fully inclusive shipping rates for EACH country (ie. shipping zone) that you ship to. If you only have the shipping rates set for your default country, but not for other countries that you ship to, then customers from other countries wouldn’t see shipping rates at checkout.
Also, keep in mind that your ‘discount codes’ (that you mentioned in your post) will apply to the order total for any eligible products. So it could be possible that you don’t have fully inclusive shipping rates set (as outlined above) and then the discount codes being applied are bringing the order total down to a point where there are no longer any shipping rates that apply to them. By making sure you have fully inclusive shipping rates set for each shipping zone, you should be able to solve this issue.
Hope the above helps! 
Cheers,
Stephen