How to optimize a text content on a given keyword?
It is hard to deal with this quite generic issue in a concise and precise way.
Overall, your content should obviously contain your keyword at least once.
Instead of trying to repeat systematically and many times this keyword, it is better to put it in key locations such as TITLE tag, a title (in H1) or a subtitle (in H2), as a text anchor of a link or even in the alt attribute of a suitable image.
Cover as much as possible the lexical field close to the expression using synonyms, adjectives and playing with the gender and the number of these keywords.
Tools such as Google Suggests are valuable sources of information to find keywords ideas used by Internet users.
The quantity of your content must be quite important. Let's count at least 300 words and ideally 600. Of course, this volume fluctuates according to the type of page: in general, a product description requires much less content than a blog article to rank.
Obviously, if your content is original, unique and relevant, this is a great advantage to achieve your goals.
It is not necessarily mandatory that the targeted keyword be both in the TITLE tag, in your H1 tag, in the URL and X times in your content.
This kind of systematic and trivial optimization is very often similar to over-optimization, where it would be sometimes more judicious to work on synonyms and related searches.
Then once again beware of the automatization of elements that will never be relevant compared with-web writer who knows the vocabulary of your sector well. Without mentioning the expectations of Internet users.
There are lots of new tools that suggest keywords to include in order to optimize a text.