Yes, it will work in a desktop (if you can mount it, preferably).
Keep in mind that laptop drives are typically much slower than desktop drives, and one of that capacity is probably pretty old. Check out disk health before putting important data on it.