Motorized bikes are illegal in New York.
Just about every other state has different laws.
I have no clue what the laws are in the 'place" you are in?
LOL: "places" asking for regionally specific information.
Yes, it's not "legal" in New York, but I've been flaunting the law in Suffolk County on Long Island with impunity for nearly 2 years (only 20% in Connecticut where it's legal with a 49cc and a driver's license). It boils down to riding style and age. I'm a large man in his 40s who wears a helmet, has blinking front and rear lights, signals (some of) his turns, rides well to the right of the lane, waves to drivers to acknowledge them, and smiles a lot at everyone. Cops NEVER bother me, and I've actually had them wave, smile, and ask me about the build. Technically, mine's not even legal in Connecticut since it's 66cc, but my fat-ass needs the power.
Soooo, to answer you: just ride responsibly and be respectful to your fellow moving humans. Keep your fingers crossed you don't end up dealing with a cop who has a chip on his shoulder, and you'll be fine.