Hello I am new to electronics. This is the circuit. https://www.engineersgarage.com/tutorial-7-dc-motor-speed-control-using-attiny85/
And this is the second one:
In my opinion the second image is way more simpler, and doesn't require programming the microcontroller, also so less compontents...