Who knows how I can build a PC that costs up to 400 euro and minecraft can do without lags
Currently no, otherwise yes
What resolution do you want to play at? Are the graphics settings important to you?
OK
Yeah, they shouldn't be so bad now
Currently very difficult with the chip crisis but if you can wait a little longer I recommend the integrated graphics unit from AMD, i.e. A Vega 11 or something.
It's very difficult at the moment.
But you can try it on the used market.
So under 400 could be very difficult if you just want to take new parts.
Otherwise look at used parts or ask your friends about parts.
Maybe I would just take a used gaming laptop.