It's partly geography, partly technology, partly era.
Historically, In the US, if the trains were pulled by steam or diesel locomotives, the enterprise was called a railroad. On the other hand most of the now defunct electric interurbans connecting cities were typically called "railways". That's a good rule of thumb, though there were exceptions. Though it's trains were pulled by steam and diesel locomotives, the Northern Pacific, which connected Minneapolis / St. Paul with the Pacific Northwest, used "railway" in its corporate name, while two of the last interurbans to operate, the Chicago, North Shore, and Milwaukee Railroad, and the Chicago, South Shore, and South Bend Railroad, used the name "Railroad" in their corporate names.
In the UK, most enterprises operating freight and passenger transport by rail used the name, and were referred to as "railways" to the extent that it's likely that a written article using the word "railway" was written in the UK, or by an author writing for a UK audience. The periodicals Model Railroader and Railroad Model Craftsman are published in the US for a US audience; Railway Modeller is published in the UK for a UK audience.
Present practice in the US would have little differentiation between "rail", "railroad", and "railway". "Railroad" would have a slight connotation of a locomotive powered freight or passenger train. Rail, especially if preceded by the word "light", would tend to refer to systems for passenger transport using cars with integral power units (that is, there is no identifiable locomotive). "Railway" could be substituted for either one of them.