question about means

every means has its own way of working.
we had no means of warning them.

my question:

is there any difference in the meaning of the word means in these two sentences?

Well, in both sentences the word “means” may be replaced with “way” (though in the first one it might sound kind of awkward due to the proximity of the other “way”) so no, I don’t think there’s any difference.

I feel that the meaning of the second “means” is more specific than the first one, but I cannot tell the difference exactly.

‘Every means has its own way of working’ does not make sense to me.
Possibly ‘means’ here is intended to be ‘solution’, in which case use of the word ‘means’ is not really a good choice.