As discussed in this topic, it's possible to link within a document using the headers using the format
[Link text](#Header) # Header
However, I just tried this with a headset with a space it in and it seems like Joplin skips it when adding in the links (maybe a performances thing since a pair of parentheses is more likely to be a feature it the text rather than a header link? But I haven investigated the code to be sure) (interestingly but tangentially, it still works with appending whitespace, having characters after the space is what invalidates it)
This is rather annoying though as it means that it's impossible to link to any header with more than one word (just using numbers and heading the actual title underneath is infeasible for more then half a dozen headers since you lose context for what they actually are and would need to keep updating if you inserted a middle header)
Whether it's a performance thing or a "links most not contain whitespace" thing, I propose disabling this check if the link begins with a hash since only header links begin with hashes (as opposed to colons, slashes or characters for various other resources) and only header links benefit from being able to add spaces.
Hope that all makes sense and looking forward to hearing what people think!