Each template gets compiled into a class with one method, calling the template is not dynamic but just like calling any other method/function in Scala or Java. Making this dynamic is possible using reflection but you will loose the static type check that ensures that you will get a compiler error if you try to call a template that does not exist or use parameters that does not match the parameter list of the individual template.
There might some use cases where you absolutely need this kind of dynamic template handling (like if you select which template to use with a database flag) but the way you have done it with an if else, or more concisely using a Scala switch/match, is probably the best since you get explicit code that will fail to compile if you do it wrong, as opposed to reflection stuff that wouldn't fail until runtime when that specific template was used.
If you just want to apply common templating around your individual sub-templates, the same header for example, then the common way to do this is to invert the template flow so that each individual template will call a "main" template passing their content as a HTML parameter that the main template will incude in the common structure.
This is how the sample play project templates are setup when you create a new project, so you can look at that, index.scala.html will call main.scala.html which contains the common markup.