If you cannot yet redesign the database, then check the next example, which executes a static query — ‘select * from mytab’ — where mytab denotes one of tables:
-- two sample tables
drop table if exists #table_2019, #table_2020
create table #table_2019 ( id int, val int)
create table #table_2020 ( id int, val int)
insert #table_2019 values (1, 100), (2, 101)
insert #table_2020 values (7, 200), (8, 201), (9, 202)
-- target table name
declare @table_name varchar(max) = '#table_2019' -- or '#table_2020'
-- redefine the synonym
drop synonym if exists mytab
declare @c varchar(max) = concat('create synonym mytab for ', quotename(@table_name))
exec (@c)
-- execute the query
select * from mytab
Therefore, instead of querying a fixed table, it uses a synonym, which is redefined before the query.
Maybe you can apply this technique in your new stored procedure with minor changes. However, it is probably not suitable for parallel execution without corresponding measures.