It's a tactic, but it isn't used exclusively, and when it has been used regularly, it tends not to be more effective than conventional warfare.
The premise that because hyperspace ramming works, it should render all other forms of warfare in the Star Wars universe obsolete seems like nitpicking to me. Of course it works. It seems to be consistent with physics in the Star Wars universe - ships do travel through and interact with physical space while entering and exiting hyperspace, and collisions with realspace objects do occur (see Han Solo mentioning the dangers of flying "right through a star" in ANH.)
So if the tactic works in universe, but why isn't it used all the time? Because throwing starships at each other and risking the loss of your own personnel and equipment is a desperate and potentially suicidal tactic and not doing that is almost always a better idea. Far more things can possibly go wrong than can go right.
Plus, once it becomes a regular tactic, countermeasures will get developed to take it into account - the enemy will disperse their command and control capabilities into multiple smaller ships or attempt to engage from a greater distance or whatever. So despite being wasteful, it's also short-sighted.
Notwithstanding the real answer being that it wouldn't be as interesting to watch ships just kamikaze one another at lightspeed.
The premise that because hyperspace ramming works, it should render all other forms of warfare in the Star Wars universe obsolete seems like nitpicking to me. Of course it works. It seems to be consistent with physics in the Star Wars universe - ships do travel through and interact with physical space while entering and exiting hyperspace, and collisions with realspace objects do occur (see Han Solo mentioning the dangers of flying "right through a star" in ANH.)
So if the tactic works in universe, but why isn't it used all the time? Because throwing starships at each other and risking the loss of your own personnel and equipment is a desperate and potentially suicidal tactic and not doing that is almost always a better idea. Far more things can possibly go wrong than can go right.
Plus, once it becomes a regular tactic, countermeasures will get developed to take it into account - the enemy will disperse their command and control capabilities into multiple smaller ships or attempt to engage from a greater distance or whatever. So despite being wasteful, it's also short-sighted.
Notwithstanding the real answer being that it wouldn't be as interesting to watch ships just kamikaze one another at lightspeed.