Most online lotteries are operated by state-based organizations that have been vetted and licensed by a gaming commission. However, there are also many 3rd party services that provide access to all sorts of lotteries from all over the world. In general, these sites charge more for their service than the official lottery sites do, but there is nothing wrong with this as long as you understand that you are paying a premium for the convenience and accessibility of the website.
It is also worth noting that while luck still plays a big role in any lotto game, there are some strategies you can employ to increase your chances of winning. For example, you can join a lottery syndicate and buy multiple tickets at once. This will increase your chances of winning by a factor of 30 or more! It is also a good idea to always read the rules of each lottery game before you play, as the rules can vary.