Normally, you can use a SharePoint Online-based CDN for most projects. As you've just seen it's far from a simple configuration setting to set up. Luckily it only needs to be done once, as you can later reuse the same CDN as long as assets do not overlap between each deployment.
An alternative to using a SharePoint Online CDN is to use storage from Microsoft Azure.
The difference between a SharePoint Online CDN and a Microsoft Azure CDN is that the former is easier to configure and has fewer options for fine-tuning the CDN. The latter will cost you extra, as services within Azure will incur fees based on consumption. SharePoint Online-based CDN is factored into the monthly fees you pay for user licenses, so there will be no extra cost for that option.
Sometimes it will be challenging to estimate in advance how much consumption your solution will create. If you're unsure which one to use, opt for the SharePoint Online-based CDN. You...