When I apply a texture to my mesh some parts aren't well rendered
It appears that you unwrapped your cube initially, and then procceeded to model some more but never unwrapped the modified object. Now your UVmap is that of the original cube, and that does not match the current state of the object, so your texture looks a bit of a mess.
Example:
Default Cube:

Slightly Modified, not unwrapped again:

Simply reset your UVmap, U &gt;reset R then unwrap again. U follow active quads (with the last selected quad face active) is usually my go to, but use whichever method that gives the result you require for your needs.
For instance, this is my modified cube with a new UVmap: