Is it a good practice to create a desktop shortcut on mac?
I would say desktop alias creation at install time for an app is an anti-pattern and bad practice for developers to implement as default behavior. 


The desktop belongs to the end user and macOS is designed to install apps for every user account and to consider more than one user per computer. To accomplish this, you’re either escalating the installer to root privileges to change multiple desktops or you’re ignoring / short cutting the way apps can (or possibly should) get installed for all subsequent users.
The launchpad and dock and spotlight / Siri are the bespoke app launch tools and idioms so you can assume your customers are very familiar with how to start an app they just chose to install.


The most kind way to do this would be to onboard the user and ask if they want any shortcuts the first time they launch the app. Apple recommends you have a very light onboarding, so even this is against "best practice" but I would see it as the best way to make an alias if you feel it's the right call for the majority of the users of your app.

I would encourage you to read over the HIG - Human Interface Guidelines and the many free WWDC videos on app packaging and installation - your question is a good one and thinking how people see your app during installation is super helpful to make your app succeed with many customers.


https://developer.apple.com/design/human-interface-guidelines/