As the wielder of the Legendary Shield, Naofumi is literally incapable of wielding any other kind of weapon. However, that still makes him far from useless. Just like support classes in competitive multiplayer games, sometimes it's more helpful to back up your teammates than inflict damage. In that regard, the Legendary Shield is basically the ultimate support weapon. It may prevent Naofumi from holding a sword, but it can transform into any number of other shields based on objects and creatures he encounters.
Thanks to this handy feature, Naofumi has dozens upon dozens of different shields at his disposal at any given time. Some create large magical barriers that double as floating platforms, some allow him to improve the quality of consumable items like potions, and even still some let him absorb and detect magical energy. A few, such as the Prison Shield's Iron Maiden ability, even allow Naofumi to actually deal damage, and a lot of it at that (albeit at the cost of all of his SP).
And that's only counting the shields he has in Raphtalia's world. In the light novels, Naofumi gains access to even more shields from other worlds, such as the Curse Series of shields and the Vassal Mirrors (via Shield Hero Wiki). However, Naofumi still has one obvious disadvantage in that he still has no practical method of offense. Thankfully, he has friends to help him with that.