A grad student has offered to hire me to write simulation code of a published paper and they said they need the simulation for their master thesis. Is it considered cheating if I accept the project?
Not necessarily, though it might be on their part and it might not be wise to do it in such a case.
I suggest that you ask for a three way conversation with the student and their advisor to clarify.
The software might not be an important component of their intellectual contribution to the thesis, or it could be.
Ask for that conversation. If the student refuses to do it, you have a strong indicator that they aren't being honest.
You do not say what field your "client" grad student is in.
In physical science fields it's normal for the grad student to do models, simulations, etc, themselves - though the extent of the help they get from others (typically in their Academic Computing Support service) depends on the nature of the project and the degree of coding skill by the grad student.
If I was you I'd:
Meet the grad student and their supervisor to discuss the work and ensure that nothing is being done by you that - academically - ought to be done by either the grad student or by staff in the ACS unit.
If the extent of the work goes beyond what a grad student in that research field could reasonably be expected to do, or if the ACS cannot/will not provide adequate help, then remuneration to you is in order. The extent of the payment - either on a task or hourly rate basis - should be outlined at your meeting with the grad student and their supervisor.
I should mention that if you are on the permanent university staff, academic or not, it is generally seen as bad form to seek money for small services to other staff/students. Rather it is usual to have the benefiting department "owe you one" in the future. This promotes goodwill and give-and-take between faculty in different departments which is worth more than money to permanent staff. Naturally, your own department seniors should be aware and approve of your freebies to other departments as it does take your time (which is really at their disposal) and they have to "get something back" from that allocation of your time.
Without a much better description of the situation it's pretty hard to tell, but as written, but no, providing a computational tool, is not in and of itself cheating. Also, yes, there are ways that the student can write this up in the dissertation that would be cheating.
Let's use a typical piece of lab apparatus as an example. If a student needs a gas chromatograph to analyze samples, and goes out and buys one, I think everyone would agree there's no dishonesty there (so long as the student doesn't claim to have built the chromatograph).
In this case, the student is asking the simulation a question. If the student says "I specced out a simulation and it was constructed to that spec by person X", citing the code builder, there would be nothing dishonest about that. If the student says "I built a simulation and used it", that would be clearly dishonest. If the student presented it a little more wishy-washily, so it wasn't perfectly clear that the simulation was created by another, that's a bit more of a gray area, but most would say without proper citation that would be cheating.
Now, if the sim were absolutely central to the student's work, and not just a side gig, then it's a bit more serious, even with proper citation. The coder may well deserve authorship, and the student's supervisor and exam committee may well question whether the student made an adequate contribution to merit a degree. Note that these issues are not cheating per se, but it may be a reason why the student one of these issues is necessarily cheating, but might provide motivation to hide or obfuscate the provenance of the code, which would be cheating.
The thesis should clearly state that you wrote this software. So when the thesis is judged, your software will contribute zero to the grade. As long as the grad student does this properly, they are not cheating. If they gave you instructions how to write the software they can add those instructions to the thesis, because they wrote those instructions.
Are you cheating? If the grad student is cheating and you knew or suspected it, then you would have contributed to cheating. If you are a student yourself that might be a problem.
Undergraduates and graduates have a toxic behavior of having such assumptions of cheating behavior regarding moral (godly) judgment. As long as things are consensual, you can pay anyone to do anything to you. Another question is if the content is highly valued intellectually and financially, which makes rather the question a further issue related to publishment and credit sharing in future profits. I helped my colleagues in college to do their essays for free. :-)