I need some help, newbie in trouble

We don’t know the dimension of your custom printer.

So we can’t compare it to the config settings.

In what way “off center”?

To the OOR error:

Move out of range: 0.000 236.000 0.000 [0.000]

This more than it is set in the config:

[stepper_y]
step_pin = PB10
dir_pin = !PB2
enable_pin = !PB11
microsteps = 16
rotation_distance = 40
endstop_pin = ^PC1
position_endstop = 0
position_max = 235
homing_speed = 50

But what did you try to achieve with these?

...
[stepper_y]
step_pin = PB10
dir_pin = !PB2
enable_pin = !PB11
microsteps = 16
rotation_distance = 40
endstop_pin = ^PC1
position_endstop = 45
position_max = 235
homing_speed = 50
...
[stepper_y]
step_pin = PB10
dir_pin = !PB2
enable_pin = !PB11
microsteps = 16
rotation_distance = 40
endstop_pin = ^PC1
position_endstop = -45
position_max = 235
homing_speed = 50
...
[stepper_y]
step_pin = PB10
dir_pin = !PB2
enable_pin = !PB11
microsteps = 16
rotation_distance = 40
endstop_pin = ^PC1
position_endstop = 0
position_max = 279
homing_speed = 50

?

You may have a look on this: Understanding X and Y Axes Limits and Homing


BTW: How do you know that all the macros in macro.cfg are needed?