Whether to use dashes or underscores in a URL depends on which part of the URL you are changing as well as your purpose. It's not always a simple answer.
Underscores vs. Hyphens in URL
Underscores vs. dashes in URLs for SEO
Does Your Domain's Hyphen Hurt SEO? Understanding the Impact on Search Rankings - Web Design and SEO from Thrive
Hyphens or Underscores in URLs: What's Best For SEO?
REST API 最佳实践-腾讯云开发者社区-腾讯云
Does using spaces in a URL affect SEO? - Quora
Best WordPress Permalink Structure for SEO - MediaOne
This is the Best URL Structure for SEO (dash vs underscore)
SEO Friendly URLs For Ecommerce
Hyphens vs. Underscores in URLs
Underscores vs. Hyphens in URL
A Word, Please: A look at the em dash, the hyphen and their rarely seen cousin, the en dash - Los Angeles Times
Underscores vs. dashes in URLs
Hyphens and Dashes - Do You Use Them Properly? : r/coolguides
Understanding How to Use Dash in a Sentence