You could use a cascading control filter (Show Relevant Values) but you need to create a dataset with data as follows (with two string/varchar columns):
type | period
========|=====
monthly | 2022-01
monthly | 2022-02
monthly | 2022-03
...
yearly | 2021
yearly | 2022
yearly | 2023
...
quarterly | 2022 Q1
quarterly | 2022 Q2
...
Then you could use this dataset for dynamic defaults of both controls. Additionally, for the second control you should click the “Show Relevant Values” option and choose the first control in the prompt.