There is no ideal or exact percentage for better ranking. Personally, 1-2% of keyword density along with “semantic keywords” and LSI keywords works best for me. Google suggests writing natural articles. Again, there is no ideal percentage, but placing your keyword in natural places will work the best.
For More Information Please Refer: https://www.shoutmeloud.com/keyword-density-seo.html