Google's John Mueller said that Google Search "won't get penalized for keyword-stuffed URLs." He said stuffing the keywords in your URLs "basically has no effect, positive or negative for search engines."
John said this on Twitter and he also added it is "a good practice to mention your keywords in the URL, but the effect is minimal." But said focusing on keywords in the URL is "often the wrong prioritization" of your SEO efforts.
Here is the tweet with this message that you can click through to see more of the context:
No, you won't get penalized for keyword-stuffed URLs. It basically has no effect, positive or negative for search engines. It's a good practice to mention your keywords in the URL, but the effect is minimal. Focusing there is often the wrong prioritization.
β π½γlink href=//johnmu.com rel=canonical γπ½ (@JohnMu) September 21, 2022
Note, several years ago, Bing told us how they detect URL keyword stuffing.
Forum discussion at Twitter.
Note: This was pre-written and scheduled to be posted today, I am currently offline for Rosh Hashanah.