If you often find yourself in this situation, I'd recommend setting up expectations prior to the date, in addition to planning how to end the date.
As someone who feels uncomfortable being in too intimate of a setting with people I don't know very well, I like to avoid being alone with someone on a first date. For me, this has meant choosing my words carefully when setting up the date, as to not set any expectations or imply any false promise of a continued hang out.
For example, if someone were to ask me what I'd like to do, I'd say:
"I'd love to _____ (ex. grab coffee) and get to know each other a little better."
Or if they set the plan, such as eating dinner together, I may say something like:
"Getting to know each other a little better over dinner sounds great."
The key with both of these statements is that you are reinforcing your intentions, and not implying anything beyond just the scope of the currently planned date. Inversely, open-ended statements about the date (i.e."Let's hang out Saturday night, maybe we can grab dinner?") may leave your date feeling like there's a potential for more to happen after the date. The more you can eliminate open-ended, unbounded expectations, the easier it will be to end your date gracefully and without conflict.
As for ending the date itself, there are a few key things you'll want to focus on.
First, show appreciation for their time, even if you aren't interested in them romantically. Even if you didn't actually have the time of your life, make sure to thank them in some way for spending this time with you (they also took time out of their day to meet with you, after all). You can do this by explicitly saying 'thank you', or just by vocalizing that you had a good time.
Second, be confident and firm in your stance to leave. Don't feel bad for excusing yourself with no explicit reasoning, it's okay to not want to spend any more time with this person.
Third, don't end/pause right after saying you're going to leave. To some people, this pause is a natural entry point into asking why, specifically, you need to come home, or even just further pressuring you to stay out longer. Instead of ending on this pause, direct the conversation somewhere else so that your date's response is not aimed at why you're leaving.
These three guidelines often have me following a script that's somewhat like the following when my date asks "So, what do you want to do next?":
"Actually, I've got to get home here soon. Thanks for coming out to grab dinner with me though, it was nice meeting you."
A reasonable person may still be a little bummed, but will respect your decision to end the date at this time. If they still reach out to you (later) showing interest in another date, this now leaves you in a much easier position (or at least not on the spot) to decline by telling them that you weren't really feeling a connection and aren't interested in meeting up again.
Unfortunately in dating there are no steps to guarantee sparing someones feelings from being hurt, but using the tips above will minimize the odds of an awkward/negative situation escalating when trying to end a date gracefully.