"mongodb+srv://<username>:<password>@crdata.mg0nclu.mongodb.net/courseLZ?retryWrites=true&w=majority". This failed to connect even though I had a white-listed IP (0.0.0.0/0).
Many hours of reading and experimenting followed including replacing the Atlas DB with a MongoDB service in the Railway container. Long story short over 24 hours after having added a white-list IP to my Atlas account the app on Railway connected to the Atlas database!! Clearly my problem is resolved but I thought it might be a good discussion topic for my first post on this forum. Thanks for “listening”.