Nothing magic about htmx or hypermedia: you still need to organize your code properly, and there are tasks for which it is not suited:
https://htmx.org/essays/when-to-use-hypermedia/
However, in many case, it can be much simpler architecture than alternative approaches: