You can use the replace directive to point to a local copy of the module. As you modify the module code locally, the compiler just uses the current state of that code. No fussing with versions.
Similar question:
https://stackoverflow.com/a/74891220
The official docs offer a more robust description.
https://go.dev/doc/modules/managing-dependencies#local_directory