What you are asking about is called a ‘Documentation Generator’. For Godot 3.2+, there exists a solution custom built for Godot called GDScript Docs Maker. Unfortunately, there is no custom solution for Godot 4 at this time. Although the language specification for Godot does have documentation comments, there doesn’t appear to be a built-in solution for rendering these into documentation.
There has been some discussion about this issue on Github. One user on that thread recommends NaturalDocs as a potential solution - it seems to be language agnostic, but may take some configuration to correctly reflect your use-case. I cannot vouch for it myself.
I hope that this helps to point you in the right direction, and I wish you luck in finding a solution that meets your needs.