Arduino Uno with garbled serial

I have the following code on the arduino uno:

/*

*/

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println("Hello world");
  delay(1000);
}

And in the serial monitor:

Hlowrdel ol
lHeloold wr
Hel rd
lowol
loHel wor
ld
Helowoldl r

Baud Rate is 9600
Board is Arduino Uno (This is listed under R3 as the original is not a category)
Using Arduino Cloud.
It has the right amount of bytes and the right letters, but sent in the wrong order.
I have found a post on stack overflow about this, same sketch, same result- however I am using the serial monitor, and the question uses java. The answers on there are all around the java code, and not the arduino itself, which is my problem.
I thought posting it on the arduino forum would be more relevant.

Hi @antxd. Please add a forum reply here to tell us which operating system you are using (e.g., "Windows")?

I ask because I would like to give you the appropriate instructions for your operating system.

I am on a macbook, and am using a USB to USB-C adaptor.
I am using arduino cloud.

Thanks for the clarification. The Arduino Cloud website doesn't have any way to directly access the serial port of your Arduino board, so we use an application called "Arduino Cloud Agent" running on your computer to act as a bridge between the board connected to the computer and the Arduino Cloud website. So when you use the Arduino Cloud Serial Monitor, the data communication pipeline is like this:

Board <---> Arduino Cloud Agent <---> Internet <----> Serial Monitor

I will ask you to perform an experiment to determine whether the problem exists at the Arduino Cloud Agent level of the pipeline. If so, we will know that the problem is with Arduino Cloud Agent or below, which will allow us to focus our troubleshooting efforts by eliminating the rest of the pipeline from consideration.

Please try this:

  1. Connect the Uno board to your computer with the USB cable.
  2. Open a sketch in Arduino Cloud Editor.
  3. Select the Arduino Uno board from the board selector if it is not already selected.
  4. Open Serial Monitor.
  5. Verify that the problem of the corrupted data is still occurring.
  6. Click the Arduino Cloud Agent icon on the macOS menu bar.
    A menu will open.
  7. Select "Open Debug Console" from the menu.
    The "Arduino Cloud Agent Debug Console" page will open in your browser.

If everything is working correctly at this level, we would now expect to see output like this in the "Arduino Cloud Agent Debug Console" page:

{
  "P": "/dev/cu.usbmodem2114101",
  "D": "Hello wo"
}

{
  "P": "/dev/cu.usbmodem2114101",
  "D": "rld\r\n"
}

{
  "P": "/dev/cu.usbmodem2114101",
  "D": "Hello world\r\n"
}

{
  "P": "/dev/cu.usbmodem2114101",
  "D": "Hello worl"
}

{
  "P": "/dev/cu.usbmodem2114101",
  "D": "d\r\n"
}

{
  "P": "/dev/cu.usbmodem2114101",
  "D": "H"
}

{
  "P": "/dev/cu.usbmodem2114101",
  "D": "ello world\r\n"
}

[...]

(the value of the P key might be different if your Uno board has a different port name)

Please add a reply here on the forum thread to tell us whether the letters are in the correct order in the output you see in the debug console page, or if they are out of order as they are in Serial Monitor. Please note that, since this is a stream of data, it is expected that the value of each of the D keys will have a random number of characters, as you see in the snippet I shared above. It doesn't matter how many characters you see in each value as long as they are in the correct order in aggregate.

The garbled text is also at the Arduino Cloud Agent level.

{
  "P": "/dev/cu.usbserial-0001",
  "D": "Hel ol"
}

{
  "P": "/dev/cu.usbserial-0001",
  "D": "lowrd"
}

{
  "P": "/dev/cu.usbserial-0001",
  "D": "\r"
}

{
  "P": "/dev/cu.usbserial-0001",
  "D": "\n"
}