If you have multiple notifications from the same app, I believe they will collapse by default. I am not aware of any workaround for that.
Single notifications should not collapse, unless you many notifications, so long as you have the notification channel set to Default.
If you have any notification channels set to Silent, they can be optionally minimized, which means they will collapse.