Just to be clear.
You need to use "0000.00" as the format to have 0 fill.
Please see:
https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings
DECLARE @tbl TABLE (col0 DECIMAL(18,4))
INSERT INTO @tbl VALUES
(123.45),
(123.4),
(123),
(123.456)
SELECT
format(cast(col0 as decimal(12,2)),'####.##')
,format(cast(col0 as decimal(12,2)),'####.00')
,format(cast(col0 as decimal(12,2)),'0000.00')
FROM @tbl