If you are confronted with the error message saying "the last backup could not be completed" while backing up iPhone to iCloud, you'd find some solutions.
Check if the device is connected to Wi-Fi. Then go to Settings > [your name] > iCloud > iCloud Backup and tap Back Up Now. If you’re using iOS 10.2 or earlier, go to Settings > iCloud > Backup and tap Back Up Now. This should solve the error message.*If the error still pops up, I think you might try other ways rather than iCloud, to backup your iPhone. It is a good choice to backup iPhone to PC. And you can do that with some data transfer app.