Rename Tag-Filename Script HELP (remove space if no Series present)

Hi!
Stuck on how to write this out to have it remove (or add) an extra space if a "Series" field is or isn't present... I've tried with removing spaces but one or the other scenario is always off if I apply the formula across all files.

Thought someone might know a clean solution....

%album% (%year%) ['['%series% %series-part%']'] - $num(%track%,2)

Ex. with Series
The House in the Cerulean Sea (2020) [Cerulean Chronicles 1]- 12.mp3 (lose a space)
The House in the Cerulean Sea (2020) [Cerulean Chronicles 1] - 12.mp3 (desired)

Ex. without Series
The Bones Beneath My Skin (2023) - 01.mp3 (desired)
The Bones Beneath My Skin (2023) - 01.mp3 (extra space)

You have to put a space before the last closing square bracket:
%album% (%year%) ['['%series% %series-part%']' ] - $num(%track%,2)

Huzzah! I poked around with adding spaces but only succeeded in mis-positioning that bracket... I think I was putting it on the wrong side of the quote... Thanks!