There is no ideal number of meals to eat within a day. Doing what works best for your schedule, hunger levels and lifestyle is best. Eating and fueling consistently throughout the day, though, can contribute to stable hunger and energy levels.
In terms of overall muscle building potential, it appears that potentially spacing your meals over the course of a day into 3-6 protein feeding opportunities could be best (PMID: 33361498). While total daily protein intake will matter most, the next best approach will be to then space those protein feedings throughout the day.