No, the two year warranty says that someone will fix the problem for two years.
How long the product lasts, depends on the design, your good / bad luck getting a product that has been built better / less good than the average, and your usage - a washing machine used 12 hours a day will not last as long as one used once a week.
The manufacturer calculates the time - two years here - by wanting customers buy more items because of the long warranty, and on the other hand not wanting to have to pay out for too many repairs. Basically, “two years warranty” tells you the manufacturer doesn’t expect many products to break in that time.
In countries with strong consumer rights (EU, UK, Australia) “warranty” is what the manufacturer gives you, but sellers have to fix problems for “a reasonable time”. And if your washing machine breaks after two years and one week, the manufacturer may fix it if they think a good reputation is worth more than the cost of a repair.