The history of physics is sort of fuzzy in my memory. So I might not have details perfect. But........
Look up (by google, for instance) a fellow named Helmholtz. First name, maybe, Friederich or Ferdinand. Plus I think there's a Von in between. He lived in, probably, the nineteenth century. If not, then the eighteenth. Certainly a German. I'm assuming he lived in Germany.
He came up with three laws of energy that are not seriously doubted by anyone who is seriously interested in the truth to this very day.
The first states that energy --though Helmholtz himself did not realize it, this really applies to matter/energy-- can not be created nor destroyed.
The second states that energy will move on it's own from areas where it is more concentrated to areas that are less concentrated.
The third is less easy to state in a simple sentence or two. But it deals with a concept known as entropy.
(And how am I going to get to the point without writing a long lecture that I'm only very partly competent to write? I don't know yet, but I'll try......)
Entropy is a measure of just how 'diluted' the energy of a system is. That is diluted in the sense of the second law; how evenly spread out the energy is. A closed system --no energy entering or leaving-- at maximum entropy might be viewed as 'dead' in a physical sense. Nothing can possibly happen within that system. No movement, no chemical reactions, etc. Plus there is no way, even in theory, to separate the energy in the system. To put it back to the state where there is energy concentrated more in some parts than in others. So that movement or chemical reactions and such then could take place again, per the second law.
Now imagine a dead battery. This would be an approximate, real world example of a closed system at maximum entropy. It is inert and it will not do the work that we normally expect of a battery. Now in the real world a dead battery does not need to remain a closed system; we can easily pour more energy into it. Using a battery charger, for instance. Or an alternator.
But the third law makes it clear that you must pay a penalty for doing so. No matter what you do it will always, always, always cost you more in energy than you can expect to extract from the system.
So imagine this alternator on your bike and charging your batteries. We can imagine that this setup will give to you X amount of energy from those batteries once they are fully charged. The third law tells us that no matter what you do you will have to pour more than X energy, substantially more in most cases, into that alternator. That energy will have to come from your own legs, perhaps. (Might as well forget that. Humans don't have the power to charge batteries like this in any reasonable time.) It might come from a gasoline engine. But the gasoline burnt would get you further by chain drive off of the engine than it will by charging batteries and having them turn a motor. The third law tells us so.
I guess I don't need to go on. I'll only end up confusing the subject and myself. But I can promise you that if you were to build such a system and claim that you made it work, then every scientist in the world --who is worth the name-- will bet any odds, any odds at all, against you, feeling completely certain that they can count their winnings as money in the bank. And they really, really will be right.
There's a reason I took the time and space to write all of this. It's in the hope that anyone who reads it will grow a bit curious. Maybe google Von Helmholtz and read what they (you) can. Gather an understanding of concepts like the conservation of mass/energy and entropy.
The understanding that I referred to above forms protective armor for the mind. You'll be able to spot horsefeathers from a mile away. You'll be insured a great deal more against fraud. Both literal and figurative.