Voltage drop over MOSFET controlled by microcontroller
What do I do wrong to get 3.1 volts instead 12 volts between Drain and
Source ?

You are operating the IRLZ44N MOSFET as a source follower and, when this happens, the source voltage can never exceed the gate voltage and usually, it's a volt or two lower (as you see). Try operating the MOSFET as a common source with the load connected between drain and +12 volts.

I got only 3.1 volts when mosfet is opened by ATtiny85 4.5 volts
signal.

Best not use the term &quot;opened&quot; because this is electrical engineering and an open circuit means &quot;no connection&quot;. If you were on a hydraulics site then you would call a valve open that allowed fluid to pass. Not in EE!
If you want to use a term use &quot;activate&quot; or &quot;deactivate&quot;.