Although using the width in an f-string seems promising, you get a syntax error when you try to use a variable for the width.
One way to get multiple spaces is using string repetition (*). I'm going to use sp to designate a space though you don't do that in your code.
'sp' 1 is one space
'sp' 2 is two spaces
'sp' * 3 is three spaces
'sp' * num (where num is an integer variable) is num spaces.