Keyword density is one of the criteria for search engines to judge whether the page content is related to the keywords you have placed.
To give a simple example: if your page email list has a total of 1000 bytes (excluding html code) and the "keyword" belongs to 5 bytes, and appears 6 times in the page, then your keyword density is 6 *5/1000=3%.
When the search engine is not very mature, many websites hide keywords in invisible places or use the same color as the background. The reason why these most primitive cheating methods are useful is that they enhance the keyword's suitability.
Of course, this method is now outdated and easily recognized by search engines. Therefore, when we are doing a website, we must adjust the keyword density. The common saying on the Internet is that the keyword density is best controlled within 2%-8%. If you are a very serious person, you may say that the density of others 1%, 12% of the density of people ranking is equally good, it can be said that any SEO experiment can come up with a counter-example to prove that it is not established. So there's no need to be serious, since everyone says it's best to stay within this range, just follow it.