Seems like ESG_Score_Sustainalytics is a numerical variable. So, to filter on this variable, there has to be a logical operation. Something like
filter(Data_m2, ESG_Score_Sustainalytics == 1)
filter(Data_m2, ESG_Score_Sustainalytics < 10)
etc.
Also, the group_by(Year) should be written as another function call after the filter, not an additional argument to filter.
filter(Data_m2, ESG_Score_Sustainalytics == 1) %>% group_by(Year)