Error in UseMethod("model") - forecasting error using time series

The data, not just a screenshot, is needed to complete a reprex. See the FAQ.

Also consider using {fpp3} and its companion text with the rest of the tools of the same generation as the {fable} package, particularly tsibble() which is needed for the modeling functions you are using. These are by the same team who produced {forecast} and they intend it to replace that generation of time series tools.