Launch App from SMS link

How can I launch a specific App page if a link is clicked in sms…? and if app doesn’t exists take user to PlayStore(Android) or AppStore(iOs) depending on device, if that’s not possible I can create a webpage with iOs and Android Link.

Can I achieve it just by using # Firebase Dynamic Links or do I have to use something else too?
Doc: https://ionicframework.com/docs/v3/native/firebase-dynamic-links/