I have a very good voice but I'm having problems with keeping the beat when I sing. I found it very difficult to flow with beat. How can I learn to keep time?
Good voice but can't count? Go into opera. You'll be in good company!
Seriously, practice against a rhythmic backing track, or just a beat. A 'drum machine' is more fun than just a metronome.
For better advice, tell us what style of music you sing, in what circumstances.
There are a a couple tricks to this I've picked up over the years.
If you are generally OK with simple rhythms but have trouble with off-beat notes, pickup notes, and syncopation, try finding some vocal event to fill in the rests (which fall on down beats). For example, you can inhale on the down beat before a pickup note. Or you can pronounce the final consonant from the note before (if it is a word that ends with a consonant) on the down beat. Focus on getting the down beat exactly right and the up beat will follow naturally.
If you can't even find down beats, try this. Walk to a regular beat, preferably somewhat fast so that you get a bit out of breath. With each step, count (or gasp) 1, 2, 3, 4. Your breathing will naturally follow this, with inhales going on 1 and 3 and exhales falling on 2 and 4 (or something similar depending on the tempo, and how fit you are). Then try singing on top of this, maintaining the breathing.
With both of these techniques, the idea is that you don't focus so much on the notes in the melody but instead get your breathing aligned with the underlying meter. It should be organic. Once you have this down, the singing of the melody should naturally follow.