The inclusion of categories in the breadcrumbs is the default behavior in Magento > 2.3, however, it is tightly coupled with categories' 'Include in menu' option. If you choose not to include the category in the menu, then it will not show up in the breadcrumbs trail.
Also, if you directly access the product (and not navigate through categories to get to it), then it will show no category breadcrumbs trail (which is actually correct, you didn't use the categories, so there is no reason to have them in the breadcrumbs).
However, if you are not using Magento>2.3, then you will have to customly add the breadcrumbs. I found this module https://github.com/EaDesgin/magento2-full-path-category-product-breadcrumb which might help you with this. I didn't use it myself, but looks promissing.