The law is stated here[0]. There is actually a required guarantee of 2 years, but within the first 6 months, any problems are assumed to have been there when you received the item.
After 6 months you may need to prove that the defect existed when you bought it.
After 6 months you may need to prove that the defect existed when you bought it.
[0] https://europa.eu/youreurope/citizens/consumers/shopping/gua....