I think you are muddling different things, 5:2, 16:8, OMAD, 24 hour fasting. Sometimes people combine some or all of the above, they're all forms of intermittent fasting, but they are all different.
5:2 is 500 calories, 2 days a week. The idea is you put yourself into a calorie deficit overall for the week by eating very little on 2 days a week and 'normally' the rest of the time (by normally people generally mean your TDEE or equivalent, some people calorie count on the non fasting days, some just eat reasonably sensibly/mindfully, some people go wild and eat whatever they fancy, your mileage may vary as the kids say). Doing pure 5:2 there are no restrictions on when or what you eat so long as it's only 500 calories per day (by day I would mean from when you wake up in the morning to when you go back to bed, I wouldn't count say eating a 800 cal dinner at 7pm on Monday, then a 500 cal lunch on Tuesday, then a 800 cal dinner at 8pm on Tuesday as a fast day for Tuesday even though you technically only ate 500 cals in the 24 hour period 7pm -7pm, if you see what I mean? Although there's nothing 'wrong' with that as an eating pattern if that's what suits you and you might well lose weight on that, it just wouldn't be 5:2.
When I was doing strict 5:2 I would eat a 'normal' dinner of about 700-800 cals the evening before, just water and herbal teas etc through to dinner (possibly I'd have a light snack of something like vegetable soup for about 100 cals for a late lunch), then dinner of 400-500 cals, nothing through the evening, then whatever for breakfast the next day (although weirdly you don't always wake up as ravenous as you'd expect the day after a fast).
16:8 is about timing of meals, there's no calorie reduction per se, you just eat 'normally' but within an 8 hour window only every day, so for most people that means skipping a meal, either breakfast or dinner and reducing afternoon/evening snacking, so e.g. eating 8AM to 4PM or 12noon -8PM only, which for most people does mean a natural calorie reduction even though there's no restriction in calories during the window (but for this reason many people find 16:8 alone is not enough to lose weight quickly).
OMAD is One Meal a Day and a more extreme version of 16:8 where you eat whatever you like but only once per day.
24 hour fasting is similar, but where a couple of times a month or once a week you do a 24 hour period on only liquids, say from dinner the day before to dinner the next day - I've not really heard of people doing this as their only weight loss method although it is apparently good for health and some people enjoy doing it for spiritual reasons.
A lot of people combine 5:2 with 16:8 or OMAD, because for many people it is a lot easier to cope on only 500 cals if that's two meals of 250 cals or one meal of 500 cals than five 100 cal snacks. Depending on how much you want to lose and your current normal eating habits you could start off trying the 16:8, don't restrict the calories initially, then drop to trying one meal a day or a 24 hour liquid fast just as a one off and see how you go. Fasting does get a lot easier once you adapt to it and learn how to cope, e.g. the importance of drinking a lot of water, much more than you think you need, and how to build a meal around lots of vegetables which are very low cal but satiating.