r – how to label lines when they are from different columns in ggplot

My dataframe is like

Date Y1 Y2
1   1   1
2   2   1
3   2   4
4   5   4
5   2   3
...

I use the following piece to plot Y1 and Y2

ggplot(aes(x = date))+
    geom_line(aes(y = Y1), color = "darkred", size = 1) + 
    geom_line(aes(y = Y2), color = "steelblue", size = 1) +
    geom_vline(xintercept = 2, linetype= 'dashed')+
    theme(panel.background = element_blank(),
          legend.position = 'bottom',
          plot.title = element_text(hjust = 0.5, size = 14))

But the legend option did not work and the figure has no legend.
How can I add the legend or label to the lines including the vertical one?
Thanks a lot for your help.