If you want to do this with just one expression, the name must not exceed the number of words that this expression can handle (here up to 4 words, but this pattern is easily extendable):

concat(
toUpper(
substring(
outputs('Compose'), 0, 1)
),
substring(
if(
less(
nthIndexOf(outputs('Compose'), ' ', 1),
0
),
toLower(outputs('Compose')),
if(
less(
nthIndexOf(outputs('Compose'), ' ', 2),
0
),
replace(
toLower(outputs('Compose')),
substring(
toLower(outputs('Compose')),
nthIndexOf(toLower(outputs('Compose')), ' ', 1),
2
),
toUpper(
substring(
toLower(outputs('Compose')),
nthIndexOf(toLower(outputs('Compose')), ' ', 1),
2
)
)
),
if(
less(
nthIndexOf(outputs('Compose'), ' ', 3),
0
),
replace(
replace(
toLower(outputs('Compose')),
substring(
toLower(outputs('Compose')),
nthIndexOf(toLower(outputs('Compose')), ' ', 1),
2
),
toUpper(
substring(
toLower(outputs('Compose')),
nthIndexOf(toLower(outputs('Compose')), ' ', 1),
2
)
)
),
substring(
toLower(outputs('Compose')),
nthIndexOf(toLower(outputs('Compose')), ' ', 2),
2
),
toUpper(
substring(
toLower(outputs('Compose')),
nthIndexOf(toLower(outputs('Compose')), ' ', 2),
2
)
)
),
replace(
replace(
replace(
toLower(outputs('Compose')),
substring(
toLower(outputs('Compose')),
nthIndexOf(toLower(outputs('Compose')), ' ', 1),
2
),
toUpper(
substring(
toLower(outputs('Compose')),
nthIndexOf(toLower(outputs('Compose')), ' ', 1),
2
)
)
),
substring(
toLower(outputs('Compose')),
nthIndexOf(toLower(outputs('Compose')), ' ', 2),
2
),
toUpper(
substring(
toLower(outputs('Compose')),
nthIndexOf(toLower(outputs('Compose')), ' ', 2),
2
)
)
),
substring(
toLower(outputs('Compose')),
nthIndexOf(toLower(outputs('Compose')), ' ', 3),
2
),
toUpper(
substring(
toLower(outputs('Compose')),
nthIndexOf(toLower(outputs('Compose')), ' ', 3),
2
)
)
)
)
)
),
1
)
)
