Generally speaking, it’s good to give yourself a buffer of at least one hour for domestic flights and at least two hours between international flights. It’s not always something you can control, however. An airline won’t sell  you a ticket with a connection that doesn’t meet their minimum connection time, but just because the amount of time for a connection is technically possible, it doesn’t mean the experience will be without stress. If possible, book a flight with a longer layover so you don’t stress about missing your second flight due to a delay on the first.