Monthly data versus yearly prediction How would you see the relation of a monthly variable categorical with a yearly target value float for differents years in order to predict.

In the farming industry the relation is not so simple for categorical values as the drought level , like pre-harvest period has more weight for some months on the yearly result because some months are more relevant.

What kind of null hypothesis test would you do for with both variables to conclude
I was thinking of anova
Any other suggestions.
You could consider each month as an explanatory variable. And the year as response variable. Because, for each year, you'll have 12 monthly variables.

With a model, you could find the relationship that has each month value with the final output. For that, you can perform a linear model (your categorical variables will or must be recoded as dummy variables for that estimation).

If you want to check the effect of the variable by itself. Yearly Target = a * Monthly Variable. I agree with @Leevo.