8 – What is the right way to replace a model from a custom module?

I found a paragraph in the documentation on the use of file templates in a custom module. This method can even be used to replace a model as I did here.

However, I wonder if this is the correct way since I've read this answer (which seems to not work with the dynamically generated suggestion).

After some research, I noticed that we can sometimes see the use of:

  • hook_theme_registry_alter
  • hook_theme only
  • hook_theme with hook_theme_suggestions_HOOK_alter

Apparently, there is no clear documentation on this subject.

Is there a difference between adding a template and replacing a template from a custom module?
If so, what is the best way to add a model and the right way to replace a model?