It may be a Molex connector, though probably not with that outline.
You might be lucky, and someone will recognise the shape, but don't hold your breath!
There are a huge variety of these connector shells, often specifically designed for a particular appliance, or range of appliances.
Even if you can find the right manufacturer, you may need an extractor tool to get the old pins out, find replacement pin(s), and obtain a crimp tool to crimp the replacement pin(s) on the wire again.
Assuming you have the make and exact model number of the appliance, you could search the appliance spares providers to see if the damaged cable assembly is available as a spare part.
When you say "attached to the filter", do you mean mains filter?
It doesn't look like this, but here's an example of the sort of spares available:
Hotpoint Washing Machine Mains Filter Wiring Harness Block Connector - Part Number C00112624 | Ransom Spares - https://www.ransomspares.co.uk/parts/washing-machines/hotpoint/mains-filter-wiring-harness-block-connector/1058.htm
Failing that it might be possible to effect a repair by abandoning the connector shell and crimping a spade terminal or joint to repair the broken cable(s), but at your risk!
If you need to ask how to connect it, I think you probably need the services of an appliance repair person.