The latest supported system on your iPhone 5 would be iOS 10, so you can restore that system to the iPhone 5.
But, that system cannot be transferred to the 6S, which supports the latest iOS 12.
So, the backup would get your files, but the restore would download and install whatever the latest system that can be restored on your 6S, which at this time would be iOS 12.1.4 (even if you presently have an older system on your 6S, the restore will only take you ahead to the current system, not back to an older version.
There is no method to go back to an older system on the 6S, as Apple will only allow "signed" systems to be installed.