That would vary from one jurisdiction to another, but I’m sure you can find guides best suited for your local laws. As inspiration, here’s what I sent to Amazon & Samsung last year (in a formal cease & desist format):
Amazon .com .ca ULC 40 King Street W 47th Floor Toronto, Ontario M5H 3Y2
Samsung Electronics Canada Inc. 2050 Derry Road West Mississauga, Ontario L5N 0B9
Montreal, April 26, 2024
WITHOUT PREJUDICE
Dear Madam or Sir,
I purchased a Samsung 980 PRO SSD 2TB drive (model MZ-V8P2T0) on Amazon .ca on March 3, 2022, which broke on April 4, 2024. This product was used under normal conditions, and I believe it should be covered by the manufacturer’s 5-year warranty.
Several chat sessions with Amazon and Samsung support have failed to provide a solution, with each party referring the matter to the other.
I am requesting that you repair or exchange the product under the Consumer Protection Act regarding the legal warranty of the reasonable durability of a product. I am also requesting reimbursement of $25 to cover the cost of sending this letter.
Therefore, I am formally notifying you to resolve the above-mentioned issue within 10 days. Failing to do so may result in legal action against you without further notice or delay.
Don’t forget the “WITHOUT PREJUDICE” magic law words otherwise their lawyers will construct the letter as blackmail.