The second link is more interesting (and shows how can users be manipulated in doing that):
In an exemplar campaign from June 2025, when the victim searches for a macOS-related issue — for example, “macos flush resolver cache” — they receive a promoted malvertising website in their search results (Figure 1). Users located in multiple countries — including the U.S., UK, Japan, China, Colombia, Canada, Mexico, Italy, and others — received these advertisements; no victims were located in Russia.
...
The fake help pages provide victims with false instructions for how to fix their problem (Figure 3).
Here it seems that the main problem is that sponsored links from scam actors can appear as first results in a Google search. From then unfortunately... people have already been trained to copy/paste arcane commands in terminal windows to solve problems. This one even encrypts the curl command in a base64 string to look more innocuous.