Your fast begins as soon as you stop eating and ends as soon as you take a bite/drink of anything with calories.
Example if you finish eating at 5pm you start your fast, then you eat at 11am, and again at 4:30 then stop again at 5pm for your next fast. You fasted for 18 hours and had an eating window of 6 hours.
If you finish a meal at 3pm eat or drink nothing with calories until 2pm then finish that meal at 3pm. You have fasted 23 hours and had a one hour eating window.
I typically have 18-20 hour fasts with 4-6 hour eating windows depending on how I feel. It varies from day to day. And some days I simply don’t fast much at all because it doesn’t fit my schedule. You can do whatever feels right for you.