f-string offers flexibility.
If the currency is determined by the system, locale allows leveraging the system's setting: LC_MONETARY for currency
Below is a f-string walkthrough
## input value or use default
totalTransactionCost = input('enter amount e.g 50000') or '50000'
## OP's code:
#print(f"Total Cost Of All Transactions: ${totalTransactionCost:>63,.2f}")
## f-string with formatting
## :,.2f || use thousand separator with 2 decimal places
## :>63 || > aligns right with 63 spaces
## :< || < aligns left
## { ... :,.2f} apply to inner f-string value
## {f'${ ... }':>64} || apply to outer f-string value
print(f'|Total Cost of All Transactions|: {f"${int(totalTransactionCost):,.2f}":>64}')
## Note that the inner and outer uses different escapes.
## The order doesn't matter though. Here, inner is " and outer is '.
|enter amount e.g 50000| 750000
Total Cost of All Transactions: $750,000.00