If you need to sort it at the time you are inserting them into the array, you can walk throw the existing numbers and insert it at the position you want it.
Something like that (InsertionSort):
public static void main(String[] args) {
  Scanner input = new Scanner(System.in);
  int arr[] = new int[10];
  System.out.println("please enter 10 random numbers: ");
  //store 10 numbers into the array
  for (int i = 0; i < arr.length; i++) {
    int number = input.nextInt();
    //switch all values in array which are > number one to the right
    int j = i;
    while (j > 0 && arr[j-1] > number) {
      arr[j] = arr[j-1];
      j--;
    }
    //insert number at correct position;
    arr[j] = number;
  }
  System.out.println(Arrays.toString(arr));
}
Anyway the better solution (imho) would be to insert the numbers at the position that they are given by the user and afterwords use Arrays.sort like this:
public static void main(String[] args) {
  Scanner input = new Scanner(System.in);
  int arr[] = new int[10];
  System.out.println("please enter 10 random numbers: ");
  //store 10 numbers into the array
  for (int i = 0; i < arr.length; i++) {
    arr[i] = input.nextInt();
  }
  Arrays.sort(arr);
  System.out.println(Arrays.toString(arr));
}
     
    
arr[i]?