Model train speed controller issue

Hi, welcome to the forum.

Could you do a few things ?
Edit your post and put the sketch between lines with three backslash-single-quotes or use the </> button.

```
Your sketch
```

It is hard to understand how it is connected.
I see that you power a 5V relais with 12V ? A relais can not be controlled with a PWM signal.
To control a motor and its direction, a H-bridge is used. There are motor driver modules that are a H-bridge. I think that Tinkercad has a H-bridge chip as well.

A normal motor is called a "brushed DC motor". Pololu has a nice set of driver modules, they look like this: https://www.pololu.com/category/11/brushed-dc-motor-drivers

There is a possibility to make a public link for your project at Tinkercad. Don't just copy the URL of your project, you need that specific public sharing link.