This study investigated the time-varying effects of vaccines and oral antiviral drugs in preventing severe COVID-19 complications and mortality in Hong Kong. Utilizing data from hospitalized patients diagnosed with SARS-CoV-2 between March 15, 2022, and November 30, 2022, the study employed the Andersen-Gill model with time-dependent explanatory variables to address immortal time bias. Results demonstrate that both vaccines and oral antivirals offered time-dependent protection, with vaccines showing significant waning effects after the fourth dose. Oral antivirals were most effective if administered within five days of diagnosis. Understanding these temporal effects is crucial for optimizing intervention strategies and improving clinical outcomes. The study also underscores the importance of considering pharmacodynamics and vaccination schedules in combating COVID-19.