How much time should I allow, as a US resident, to catch a domestic flight from JFK after arriving from Scotland. On a Tuesday afternoon in Oct.
Depends on the details.
If it's a single booking, your booking is automatically "legal" and you have a good chance of making it. It's not guaranteed (it never is), but if something goes wrong the airline will put you on the next available flight for free.
Things go a LOT faster if you have Global Entry and TSA pre-check. Highly recommended for a tight connection.
I'd say 2.5 hours gives a pretty good margin. With Global Entry, pre-check & no checked luggage 90 minutes should work as well.
If it's two separate bookings, I'd go with a minimum of 4 hours. 6 would be safer, since there is a lot of money at stake. If you miss you connection (delay, weather, lost bags, immigration issues) you are a "no show" and may have to buy a completely new ticket.