Have used sequence diagrams for interactions & state diagram for state machines from mermaid for this. https://mermaid-js.github.io/mermaid/#/
System architecture is probably best in PlantUML as already pointed out in other comments. https://real-world-plantuml.com/ is helpful.
But mostly it's a lot of manual effort to keep it updated, but the markdown (in git repo) makes it easier I guess...
=> One thing that worked at times was to have new joinees in team update the docs and the diagram based on their understanding + having this system architecture as part of onboarding sort of ensures it is updated on most occasions. :)
=> One thing that worked at times was to have new joinees in team update the docs and the diagram based on their understanding + having this system architecture as part of onboarding sort of ensures it is updated on most occasions. :)