“The ends justify the means.”
If you think this is a quote from Machiavelli, you’re mistaken. Along with most of the people on the planet.
Because he never said it.
What he did say was: “One must consider the final result.”
Which means something altogether different.