I'm getting same MAE value in decision tree model for maxdepth value from 1 to 10
In this line:

for(i in 1:10){mae &lt;- get_mae(maxdepth = 3, target = target, predictors = predictors, training_data = split_data$train, testing_data = split_data$test)}


You are setting maxdepth to 3 for every i. You have to change it for:

for(i in 1:10){mae &lt;- get_mae(maxdepth = i, target = target, predictors = predictors, training_data = split_data$train, testing_data = split_data$test)}