@the reason is the NodeJS version you are currently using. The methods are newly introduced and the version you are using does not support yet.
Here is the example code snippet of these two methods
// TypedArray.prototype.toSorted()
const numbers = new Int16Array([5, 1, 8, 3, 2]);
const sortedNumbers = numbers.toSorted();
console.log(sortedNumbers); // Output: Int16Array(5) [1, 2, 3, 5, 8]
console.log(numbers); // Output: Int16Array(5) [5, 1, 8, 3, 2]
// TypedArray.prototype.with()
const numbers = new Int8Array([1, 3, 5, 7, 9]);
const modifiedNumbers = numbers.with(2, 10);
console.log(numbers); // Output: Int8Array(5) [1, 3, 5, 7, 9] (original remains unchanged)
console.log(modifiedNumbers); // Output: Int8Array(5) [1, 3, 10, 7, 9]