I think you should distinguish between meter and time signatures. Understand meter first then the time signatures used to represent meters.
Musical meter can be understood as an abstract mathematical idea.
Time signatures are the product of centuries of notation development. As a system they are inconsistent and involve exceptions to rules. But, the good news is that in normal practice there are a small number of common time signatures.
Meter
Meter is a regular pattern of accents. Logically it needs at least 2 units so that something is accented while some other thing is not accented. The next larger group of units will be 3. All larger groups can be divided into combinations of just 2 or 3. Sorry for that digression, but it's musically relevant to understand the significance of 2 and 3.
- Meters using a division of 2 are called duple.
- Meters using a division of 3 are called triple.
- Meters using combinations of 2's and 3's are called additive. Example, a meter based on 7 could be broken into groups like 2+2+3, 2+3+2, or 3+2+2. Let's gloss over questions like a count of 7 with only a single accent.
Regardless of how a meter is notated in written form aurally it will conform to this breakdown into groups of 2 or 3. Of course, music may not conform to a regular meter and it would be called un-metered.
Time Signatures
Time signatures are the traditional way to indicate meters in a score and they aren't consistent.
The main inconsistency, however, involves groups of 3. If you get a handle on the time signatures involving 3, the rest should be fairly straight forward.
While meters and time signatures can be classified as duple or triple, they are also classified as simple and compound. Strictly speaking duple/triple tells the number of accents (beats) per measure while simple/compound tell the number of subdivisions of the beat. Subdivision of the beat by 2 is simple and subdivision by 3 is compound.
Regarding the top number of the time signature:
- if it is a power of 2, the meter is duple and simple
- if it is divisible by 3, it is triple, and simple or compound
- if it is prime, it is additive
Notice how the terminology gets jumbled together right at the start of reading the time signature! And the line for "3" more complicated than the other two.
We can untangle the complications by falling back to the abstract metrical concept of 2 and 3 and finding where the accents (beats) are placed and how beat subdivision is handled. The practical way to illustrate it is by comparing the time signatures 3/4 and 6/8.
Numbers like 6 and 12 can be divided by either 2 or 3. From a metrical perspective we could think of them as ambiguous compared to a number like 8 which cannot be divided by 3. Let's examine 6. It could be grouped two ways (angle bracket shows the accent/beat)...
> > >
| | | | | |
...or...
> >
| | | | | |
I deliberately made abstract figures above and did not indicate the time signatures. Again, the idea is first understand the abstract pattern, then understand the time signature.
The traditional time signature for 3 beats subdivided by two is 3/4...

The traditional time signature for 2 beats subdivided by 3 is 6/8...

The eighth note beaming indicates the beat.
Time signature conventions are...
- Simple and triple is 3/4
- Compound and duple is 6/8
If we wanted to state rules, it would be something like...
- upper numbers that are powers of two or the number 3 are simple
- upper numbers that are greater that 3 and divisible by 3 are compound
- upper numbers divisible by 2 and 3 could be compound or reduced and re-beamed to become simple meters
- upper numbers that are prime are additive meters
- the lower number of a simple meter indicates the note type used for the beat
- the lower number of a compound or additive meter indicates the note type used to subdivide the beat, the number of beats per measure being the upper number divided by 3 for compound meters or some division of the upper number by 2 or 3 for additive meters.
...logical rules get unwieldy, because the time signatures follow conventions not rules.
We could notate rhythms with beaming and accents that contradict those conventions...

...or...

...mathematically we have the correct number of notes, but either we are accidentally contradicting the conventional placement of accents, or technically we are using the rhythmic device called hemiola.
In the two sections above the meter part is straight forward while the time signature part is a confusing mess of two counting systems.
Instead of trying to handle time signatures with pure logically, just follow conventions.
When the top number is: 2, 3, or 4 it gives the beats per measure, is simple meter, and and the lower number indicate which note type gets the beat. Subdivide the beat by 2 or 4.
When the top number is: 6, 9, or 12 it gives total subdivisions of the beat per measure, is compound meter, and the lower number is the note type used to subdivide the beat into groups of 3 typically it will be an eighth note.
When the top number is one of the primes: 5, 7, 11, or 13 it gives total subdivisions of the beat per measure, the meter is additive, and the lower number is the note type used subdivide the beat into unequal groups of 2 and 3.
A practical list might be...
Simple
2 3 4 3 2 3
4, 4, 4, 8, 2, 2
Compound
6 9 12 6
8, 8, 8, 4
Additive
5 7 11 13
8, 8, 8, 8
The list above isn't exhaustive and additive or changing time signatures can be written differently. Like this for 7/8...
3+2+2
8
But, there are only about a dozen common time signatures. It may be easiest to just memorize how they are classified and practice counting them.
...I am still struggling when reading music to understand if there are
the correct beats within a measure...
If the score is notated correctly, you don't need to worry about this. Try to focus on counting the time (either out loud or silently in your head.) The only case I can think of to worry about having the correct beats per measure is proof reading a score.