In “我只喜歡你一個” what does the "一個" do?
It is there for emphasis.

The two sentences have similar meanings, while the one with "一個" has more emphasis on that you are the ONLY one that I like. It can be used to transfer stronger emotion.