You don't need both CAST's. The interior cast will not change the final result in any way. So you just need
CAST(SUM(MyFieldNameHere) AS Decimal(21,4))
The SUM documentation at https://learn.microsoft.com/en-us/sql/t-sql/functions/sum-transact-sql?view=sql-server-ver15 states that the return type of a SUM of a decimal(p,s) will be decimal(38,s). So changing the type before the sum from decimal(19,4) to decimal(21,4) won't change the result.
Tom