I remember looking into this years ago, desalination is a reasonable solution (for houshold usage in developed nations) at only a few times the ridiculously low water cost we have now. Agriculture is the issue because it currently depends on insane amounts of cheap water dispite there being more water efficient methods of growing crops (indoor hydroponics).
first result https://hannahritchie.substack.com/p/how-much-energy-does-desalinisation