Star Wars has a long history of drawing inspiration from other films and TV shows. George Lucas famously found inspiration for C-3PO and R2-D2 from two characters in the Japanese film The Hidden Fortress, while other elements and sequences were drawn from Flash Gordon, The Searchers, Lawrence of Arabia, and The Dam Busters. Those are only a few of the many, many sources Lucas drew from, so it only stands to reason that Rian Johnson did the same when creating his own movie, Star Wars: The Last Jedi. Johnson revealed that a battering ram-like weapon used by The First Order was directly inspired by a miniseries from his youth called Masada.
This big walled city and the battering ram that the Romans were building, to build up, I just remember how terrifying that battering ram was. So that's actually the pull for me.
At one point in Star Wars: The Last Jedi, The First Order have mobilized some ground forces to storm the last stronghold of The Resistance. To get through the massive steel door, The First Order wheels in this cylindrical cannon-like weapon that will fire a powerful laser beam into the door. It's bad news for The Resistance, and Rian Johnson took direct inspiration for this battering ram from, well, real battering rams. Specifically, ones used by the Romans soldiers of old when they would storm fortresses, which served as inspiration for the sequence in general.
Rian Johnson told IGN that he based The First Order's weapon was based on the battering ram he saw the Romans use in the 1981 miniseries, Masada. The miniseries was a fictional recount of the historical siege of the Masada citadel in Israel by legions of the Roman Empire. The siege tragically ended in a mass suicide, when the Romans stormed the citadel only to discover that the defenders had all killed themselves after a Roman victory became imminent. I don't mind spoiling that this isn't how The Last Jedi ends, but enemy forces attacking a walled-in last defense certainly fits the bill for the movie's climactic sequence.
You can very briefly see this battering ram in use during this commercial for the original broadcast of Masada. You really can find anything on YouTube.