You may have to adjust or replace the chain, was the chain fitted with a 23t cassette fitted? If the wheel originally had 25t or 28t then you should be able to just swap cassette, however if the chain was fitted while it had a 23t cassette then it's possible it was set up only to work with 23t max. If in doubt, fit a new chain.