The short answer
Keep the slug — the part of the URL after the domain — short, lowercase, hyphenated, and carrying the words someone would use to describe the page. Three to five words is the working range for most pages. Anything longer is usually a sentence that escaped into the address bar, and anything shorter usually says nothing at all.
There is no official limit, and no ranking bonus for hitting a particular character count. The reasons to keep slugs short are practical: people can read them, remember them, paste them without breaking them, and tell what the page is about from the URL alone. A slug is a label, and labels work best when they are short.
What a slug is, precisely
For a URL like https://example.com/guides/how-long-should-a-url-slug-be , the slug is how-long-should-a-url-slug-be — everything after the last slash that identifies this one page.…