無くす means, you lost something and it's your fault.
失う is more neutral. It isn't necessarily your fault.
If you say 「お金をなくした」, I think of: just lost a purse.
If you say 「お金を失った」, I think of: robbery, fraud or failure of an investment.
When I'm looking for glasses or something and think "ok, it's not my fault, I just can't find it", I'd say 「メガネがどこかに行った」「メガネが見えなくなった」「メガネがなくなった」
There are many phrases, in those 「なくす」and「失う」are equivalent. For example, both「やる気をなくす/失う」are correct.
And there are similar words「亡(な)くす/喪(うしな)う」but they mean someone related to you passes away.