It is not possible to use placeholders for the period as the period itself is not a varchar parameter but a keyword. A workaround can be to use a case expression in your condition, something like this:
table."registrationCreatedAt" >= now() -
case
when {{ period }} = 'day' then interval 1 day
when {{ period }} = 'week' then interval 1 week
when {{ period }} = 'month' then interval 1 month
when {{ period }} = 'year' then interval 1 year
else null
end