But you can do this with htmx by using the respected hx-* attributes.
For example, on button click to GET html. Again, you can specify what you want to do with the returned html with attributes such as hx-swap
Unless I am misunderstanding, of course.
I do remember triggers/hooks with things like Angular and Knockout. I don't miss this method of web development.
I recommend starting small and working up with htmx. Their examples section on the official website is pretty good.