Link sidebar buttons and scripts

If you mean adding a new link here:

Then, you can use addCommunitySectionLink API. You have an example in the comment.

https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/lib/plugin-api.gjs#L2414-L2471