Gutenberg: Difference between “import” and “const” for dependencies

import will import those items from a package. const is just an indicator that a variable is a constant, a variable that cannot be reassigned. E.g. const number = 5;.

In this case, these 2 lines do exactly the same thing:

const useSelect = wp.data.useSelect;
const useSelect = window.wp.data.useSelect;

The important difference being that if you had included a copy of the data package in your bundle, then used const useSelect = wp.data.useSelect; it would not use that data package, it would use wp.data as loaded by WordPress. The same as if you had written wp.data in the browser console, or jQuery(document).ready(...

However, because you used WP Scripts, it has webpack set up not to include WordPress packages from a predefined list, and to instead use the already loaded versions. It generates a PHP file with scripts to enqueue that the built bundle needs to run.

So for your purposes, always use import.