About target

In regression, can we use a vector as a target? I mean more than 2 values can be the target.

Yes. The exercise here is limited to single target regression. However, scikit-learn provides multi-target regression whenever the algorithm supports it. You can thus provide a y 2D matrix of shape (n_samples, n_targets).

Just to complement @glemaitre58 response, you can directly look at the documentation of the linear regression or any other regression. You will notice that in the description of the fit(X, y, sample_weight=None) method it says that the target (denoted by y) is
y: array-like of shape (n_samples,) or (n_samples, n_targets)
Target values. Will be cast to X’s dtype if necessary.

Thank you so much!!