Create a path alias from a contrib module in drupal 9 10

Motivation

Create a path alias for paths used by your contributed module to give nicer paths for module-name-prefixed paths, if those paths are not already taken.

Words searched

Per https://drupal.stackexchange.com/a/291584/4195 this is the way to programmatically save a path alias: