A decade or so ago, some people would try to optimize their pages with their main target keyword in all sorts of ways to try to game Google. They used to pepper their pages with their targeted keywords within articles which didn’t look they were written for humans. Search terms looked like they were forced to fit into page content. Target search terms were also stuffed into pages and then made invisible (to the human eye) by making the font color the same as the background colour. And the list goes on. But Google caught on to their tricks and those sites paid the price.
Fast forward a decade and Google’s algorithm has changed quite a bit. Google does not just look at keywords per se anymore. It looks at context. So how does one optimize a page based on context?