You can only edit messages from the same device. So, if you have used your phone to send a message, then you can only use the same phone to edit it. You cannot make the edit using WhatsApp Web or Desktop.