RFM95W + Nano Initialization issue

I am using Arduino nano and RFM95W module and there are 3 of these modules. Issue I am facing is with the one which was supposed to transmit signal.
Pin connections are as follows
RFM95W-Arduino nano
VCC-3.3V
GND-GND
SCK-D13
MISO-D12
MOSI-D11
NSS-D10
RST-D9
DIOO-D2

Push button
pin1-D3
pin3-GND

I tried basic initialization code, and it was unable to initialize the LoRa module
At first the module and the nano were working fine with the full code but after few transmissions I saw onboard led (maybe it is for D13) was glowing after trying to transmit signal for the first time and for the first time the signal was reaching the receiver node but after that onboard led would turn on and I had to restart the nano to send another signal. After doing this for few times I changed the code and after that the module is not initializing.
assuming the code has no errors, and the pins are well defined in the code, what could be the possible cause of this?
Iam facing same issue with my other module right now (onboard led glowing D13)
and signal not being received after initializing
.

Hi, welcome to the forum

Do everyone a favour and kindly read How to get the best out of this forum so you can post effectively. The more information we have the more we can help.
Here is the link How to get the best out of this forum

the above statements appear to conflict
are the RFM95 modules initializing or not ?
which LoRa library are you using?
if you are using LoRa.h do you check the module initializes OK, e.g.

void setup() {
  Serial.begin(115200);
  Serial.println("LoRa Sender ");
  //void setPins(int ss = LORA_DEFAULT_SS_PIN, int reset = LORA_DEFAULT_RESET_PIN, int dio0 = LORA_DEFAULT_DIO0_PIN);
  LoRa.setPins(10, 9, 2);  // 10 for UNO and Nano, 53 for Mega
  if (!LoRa.begin(433E6)) {
    Serial.println("Starting LoRa failed!");
    while (1)
      ;
  }
  Serial.println("starting Lora OK");

on initializing the RFM95 the serial monitor should print "starting Lora OK"

if you are using the classic Nano it uses 5V logic the RFM95 uses 3.3V logic
you should use a level converter to connect the devices

I have connected the RFM95W 915MHz module to 3.3v Arduino nano pin directly.
I guess I set TX power to 23 earlier by mistake and due to this issue one module might have been damaged that's why not initializing. However, the two other modules are working well right now with direct power connection to nano 3.3V(I decreased the transmission power to accommodate the current supplied by 3.3v nano pin.
There were supposed to be 3 devices in the system and the code for them was supposed to be as following. Since two modules are with me so I have tested the following codes between the two by interchanging the codes, and these are working

  1. For transmitter
#include <SPI.h>
#include <LoRa.h>

#define LORA_SS 10
#define LORA_RST 9
#define LORA_DIO0 2
#define BUTTON_PIN 3
#define BUZZER_PIN 7

const long RF95_FREQ = 915E6; // Frequency
const int SF = 8;           // Spreading Factor
const long BW = 125E3;       // Bandwidth (125 kHz)
const int TX_POWER = 13;     // Transmission Power in dBm

// Configurable IDs
const String transmissionID = "001";
const String centralID = "999";
const String postID = "123";  // Allowed relay node
const int hopLimit = 4;       // Maximum hops allowed

unsigned long lastButtonPress = 0;
const unsigned long debounceDelay = 500;  // Debounce delay in milliseconds

void setup() {
  Serial.begin(9600);
  while (!Serial);

  pinMode(BUZZER_PIN, OUTPUT);
  pinMode(BUTTON_PIN, INPUT_PULLUP);

  LoRa.setPins(LORA_SS, LORA_RST, LORA_DIO0);

  if (!LoRa.begin(RF95_FREQ)) {
    Serial.println("Failed to initialize LoRa!");
    while (1);
  }

  LoRa.setSpreadingFactor(SF);
  LoRa.setSignalBandwidth(BW);
  LoRa.setTxPower(TX_POWER);

  Serial.println("LoRa Transmitter Ready");
}

void loop() {
  unsigned long currentMillis = millis();
  
  if (digitalRead(BUTTON_PIN) == LOW && (currentMillis - lastButtonPress >= debounceDelay)) {
    lastButtonPress = currentMillis;

    String messageContent = "ALERT";
    String preamble = transmissionID + centralID + postID + String(hopLimit);
    String packet = preamble + messageContent;

    Serial.print("Button pressed, sending message: ");
    Serial.println(packet);

    LoRa.beginPacket();
    LoRa.print(packet);
    LoRa.endPacket();
    Serial.println("Message sent.");
  }

  // Check for incoming packets
  int packetSize = LoRa.parsePacket();
  if (packetSize) {
    String receivedPacket = "";
    while (LoRa.available()) {
      receivedPacket += (char)LoRa.read();
    }

    // Ensure the packet is long enough before parsing
    if (receivedPacket.length() >= 10) {
      // Extract preamble and message
      String receivedTransmissionID = receivedPacket.substring(0, 3);
      String receivedCentralID = receivedPacket.substring(3, 6);
      String receivedPostID = receivedPacket.substring(6, 9);
      int receivedHops = receivedPacket.substring(9, 10).toInt();
      String messageContent = receivedPacket.substring(10);

      Serial.print("Received message from ");
      Serial.print(receivedTransmissionID);
      Serial.print(": ");
      Serial.println(messageContent);

      // If this node is allowed to relay the message
      if (receivedPostID == transmissionID && messageContent == "ACKTT") {
        digitalWrite(BUZZER_PIN, HIGH);    
        delay(2000);
        digitalWrite(BUZZER_PIN, LOW);
      } else {
        Serial.println("Acknowledgement not received");
      }
    } else {
      Serial.println("Received packet is too short");
    }
  }
}
  1. For Relay Post
#include <SPI.h>
#include <LoRa.h>

#define LORA_SS 10
#define LORA_RST 9
#define LORA_DIO0 2
#define BUZZER_PIN 7

const long RF95_FREQ = 915E6; // Frequency
const int SF = 8;           // Spreading Factor
const long BW = 125E3;       // Bandwidth (125 kHz)
const int TX_POWER = 13;     // Transmission Power in dBm

String myPostID = "123"; // This node's Post ID (allowed to relay)
const int hopLimit = 4;  // Maximum hops allowed

void setup() {
    
   pinMode(BUZZER_PIN,OUTPUT);
    
  Serial.begin(9600);
  while (!Serial);

  LoRa.setPins(LORA_SS, LORA_RST, LORA_DIO0);

  if (!LoRa.begin(RF95_FREQ)) {
    Serial.println("Failed to initialize LoRa!");
    while (1);
  }

  LoRa.setSpreadingFactor(SF);
  LoRa.setSignalBandwidth(BW);
  LoRa.setTxPower(TX_POWER);

  Serial.println("LoRa Relay Node Ready");
}

void loop() {
  int packetSize = LoRa.parsePacket();
  if (packetSize) {
    String receivedPacket = "";
    while (LoRa.available()) {
      receivedPacket += (char)LoRa.read();
    }

    // Extract preamble and message
    String receivedTransmissionID = receivedPacket.substring(0, 3);
    String receivedCentralID = receivedPacket.substring(3, 6);
    String receivedPostID = receivedPacket.substring(6, 9);
    int receivedHops = receivedPacket.substring(9, 10).toInt();
    String messageContent = receivedPacket.substring(10);

    Serial.print("Received message from ");
    Serial.print(receivedTransmissionID);
    Serial.print(": ");
    Serial.println(messageContent);

    // If this node is allowed to relay the message
    if (receivedPostID == myPostID && receivedHops > 0) {
      String newPreamble = receivedCentralID + receivedCentralID + receivedTransmissionID + String(receivedHops - 1);
      String forwardPacket = newPreamble + "ACKTT";
            
      digitalWrite(BUZZER_PIN,HIGH);

      Serial.print("Sending Acknoledgement");
      Serial.println(forwardPacket);

      LoRa.beginPacket();
      LoRa.print(forwardPacket);
      LoRa.endPacket();
            
      delay(2000);
            
      digitalWrite(BUZZER_PIN,LOW);
            
    } else {
      Serial.println("Not forwarding message (Post ID mismatch or hop limit reached).");
    }
  }
}
  1. For Final Central Point (Point where all the transmission are intended to reach)
#include <SPI.h>
#include <LoRa.h>

#define LORA_SS 10
#define LORA_RST 9
#define LORA_DIO0 2
#define BUZZER_PIN 7

const long RF95_FREQ = 915E6;  // Frequency
const int SF = 8;              // Spreading Factor
const long BW = 125E3;         // Bandwidth (125 kHz)
const int TX_POWER = 13;       // Transmission Power in dBm

// Configurable IDs
String myCentralID = "999";     // Central Node ID (this node's ID)
const int hopLimit = 4;         // Maximum hops allowed

void setup() {
  Serial.begin(9600);
  while (!Serial);

  pinMode(BUZZER_PIN, OUTPUT);

  LoRa.setPins(LORA_SS, LORA_RST, LORA_DIO0);

  if (!LoRa.begin(RF95_FREQ)) {
    Serial.println("Failed to initialize LoRa!");
    while (1);
  }

  LoRa.setSpreadingFactor(SF);
  LoRa.setSignalBandwidth(BW);
  LoRa.setTxPower(TX_POWER);

  Serial.println("LoRa Receiver Ready");
}

void loop() {
  int packetSize = LoRa.parsePacket();
  
  if (packetSize) {
    String receivedPacket = "";

    // Read the received packet
    while (LoRa.available()) {
      receivedPacket += (char)LoRa.read();
    }

    Serial.print("Received packet: ");
    Serial.println(receivedPacket);

    // Extract preamble and message
    if (receivedPacket.length() >= 10) {  // Ensure packet length is valid
      String receivedTransmissionID = receivedPacket.substring(0, 3);
      String receivedCentralID = receivedPacket.substring(3, 6);
      int receivedHops = receivedPacket.substring(9, 10).toInt();
      String messageContent = receivedPacket.substring(10);

      Serial.println("Message breakdown:");
      Serial.print("Transmission ID: ");
      Serial.println(receivedTransmissionID);
      Serial.print("Central ID: ");
      Serial.println(receivedCentralID);
      Serial.print("Hops: ");
      Serial.println(receivedHops);
      Serial.print("Message Content: ");
      Serial.println(messageContent);

      // Check if the message is for this central node
      if (receivedCentralID == myCentralID) {
        Serial.println("Message is for me.");
        // Handle the received message
        String newPreamble = myCentralID + myCentralID + receivedTransmissionID + hopLimit;
        String newPacket = newPreamble + "ACKTT";

        Serial.print("Sending Acknowledgement: ");
        Serial.println(newPacket);

        digitalWrite(BUZZER_PIN, HIGH);

        LoRa.beginPacket();
        LoRa.print(newPacket);
        LoRa.endPacket();

        delay(2000);
        digitalWrite(BUZZER_PIN, LOW);
      }
    } else {
      Serial.println("Received packet is too short.");
    }
  } 
}

The central system has display too and it is connected to 5v nano pin and RFM95 at 3.3v pin of nano. I earlier used a code as follows and this was working earlier.

#include <SPI.h>
#include <Wire.h>
#include <LoRa.h>
#include <U8g2lib.h>

#define SS 10
#define RST 9
#define DIO0 2
#define BUZZER_PIN 7
#define OLED_I2C_ADDR 0x3C
#define LORA_FREQ 915E6

U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);

void setup() {
  pinMode(BUZZER_PIN, OUTPUT);
  Serial.begin(9600);
  LoRa.setPins(SS, RST, DIO0);
  if (!LoRa.begin(LORA_FREQ)) {
    Serial.println(F("LoRa init failed"));
    while (1);
  }
  LoRa.setTxPower(10); // Lower transmission power

  u8g2.begin();
  u8g2.clearBuffer();
  u8g2.setFont(u8g2_font_ncenB08_tr);
  u8g2.setCursor(0, 10);
  u8g2.print(F("Waiting for messages..."));
  u8g2.sendBuffer();
}

void loop() {
  int packetSize = LoRa.parsePacket();
  if (packetSize) {
    String message = "";
    while (LoRa.available()) {
      message += (char)LoRa.read();
    }
    Serial.print(F("Received: "));
    Serial.println(message);

    // Display message on OLED
    u8g2.clearBuffer();
    u8g2.setCursor(0, 10);
    u8g2.print(F("Received Message:"));
    u8g2.setCursor(0, 30);
    u8g2.print(message);
    u8g2.sendBuffer();

    // Check if the message is a "panic" message
    if (message.equalsIgnoreCase("panic")) {
      Serial.println(F("Panic message received! Sending ACK..."));
      
      // Send back ACK
      LoRa.beginPacket();
      LoRa.print(F("ACK: Panic received"));
      LoRa.endPacket();

      // Activate buzzer (optional)
      digitalWrite(BUZZER_PIN, HIGH);
      delay(500); // Buzzer on for 500 ms
      digitalWrite(BUZZER_PIN, LOW);
    }
  }
}

But now when I tried to upload this code again with another laptop or phone, it's just not working and the display along with the serial initialization is not happening and also the RFM95W is not working.
Suggest me the changes I need to incorporate in power supply management or anything other than that such that I can make a max output out of this system.

Suggest you either return to the previous laptop or phone and see what is different.