wasonCheung if you want to create a shorter URL ponctually, like when manually sharing a page, you can remove everything after the discussion ID. Flarum will automatically redirect to the complete slug and there's a canonical URL tag so it's friendly to search engines as well.
If you want to always use shorter URLs for everyone, you would need to change the slug driver. I don't remember if we include an ID-only slugger with Flarum. That would be on the Basics admin page. There was also an extension that let you manually write a custom slug for a specific discussion.
If you want to change the prefix before the discussion ID and slug, my paid Custom Paths extension can be used. But you can't make the prefix any shorter than the default 1 character and a slash.