You are correct that there are sources of inflammation that are not lifestyle related, but many of the drivers of inflammation are indeed lifestyle related.
I really like this article on the drivers of inflammation: https://www.nature.com/articles/s41591-019-0675-0
I particularly like Figure 1