Which "only" works better here? Or do they both work equally fine?
It depends on the context. The second one might tend to be used in more scientific contexts. For example:
I'd advise you to just get the job done any way you can and not worry about ruffling feathers. If there are complaints, they probably won't affect you, because the owners, they may only think about result