Both are different
"Keyword stuffing" refers to the practice of loading a webpage with keywords.Filling pages with keywords in a negative user experience, and can harm your site's ranking. Focus on creating useful, rich content that uses keywords appropriately and in context
Keyword density is the percentage of times a keyword or phrase appears on a web page compared to the total number of words on the page. In the context of search engine optimization keyword density can be used as a factor in determining whether a web page is relevant to a specified keyword or keyword phrase.