XBee and Mega

Apologies if this a relatively simple question, but I am rather new to Arduino's and cannot seem to find any concise information on the topic.

This is my XBee, mounted on a shield and placed onto a MEGA 2560. I want to leave Serial for USB debugging and use the Serial1 for XBee communication. How do I do this?

Just to confirm, the two XBee's do communicate if I use SoftwareSerial. This is the code that works using SoftwareSerial:

#include <SoftwareSerial.h>
 
// XBee's DOUT (TX) is connected to pin 10 (Arduino's Software RX)
// XBee's DIN (RX) is connected to pin 11 (Arduino's Software TX)
SoftwareSerial serial1(10, 11); // RX, TX
boolean nextLine = false;
void setup() 
{
  Serial.begin(9600);
  serial1.begin(9600);
}
 
void loop() 
{
   while(serial1.available()){ // there is data being sent from the xBee
    char read = char(serial1.read());
    if(read == 'A'){
      //Where ~ is the EOT character
      serial1.write("55.134~");
    }
  }
}

I am falling down an XBee rabbit hole.

I am now looking at the XBee Arduino Library. I have the XBee that is on my Arduino in API mode as a coordinator, and the XBee plugged into my PC is in AT mode as an end point.

I am trying this code:

#include <XBee.h>

// Create an XBee object at the top of your sketch
XBee xbee = XBee();

void setup()
{  
  Serial.begin(9600);
  Serial1.begin(9600);
  // Tell XBee to use Hardware Serial. It's also possible to use SoftwareSerial
  xbee.setSerial(Serial1);
}

void loop()
{  
  // Create an array for holding the data you want to send.
  uint8_t payload[] = { 'H', 'i' };
  
  // Specify the address of the remote XBee (this is the SH + SL)
  XBeeAddress64 addr64 = XBeeAddress64(0x0013A200, 0x40C2D58E);
  
  // Create a TX Request
  ZBTxRequest zbTx = ZBTxRequest(addr64, payload, sizeof(payload));
  
  // Send your request
  xbee.send(zbTx);
}

Where the receiving XBee's SH = 13A200 and SL = 40C2D58E. Sadly the receiving XBee isn't displaying as having received anything in XCTU.
Does anybody have any experience using this library/advice on what to do?

I have the XBee that is on my Arduino in API mode as a coordinator, and the XBee plugged into my PC is in AT mode as an end point.

Why on earth would you do that? Use API mode on both or AT mode on both. API mode is generally used when the XBee is reading sensor data or setting output pins. Otherwise, use AT mode. It does not matter that the packets that the XBee sends look like API packets.

  xbee.setSerial(Serial1);

Do you have the XBee physically connected to TX1 and RX1?