When sitting on your bike, you should be able to reach the pedals with a slight bend in your knees.
Source: https://skprevention.ca/safety/bike-and-wheel-safety/#toggle-id-4