Yes and no. The H-1B visa is "dual intent" [1] and you are allowed to apply for and receive a green card (permanent resident card) while on an H-1B. After 5 years with permanent residence you can apply for citizenship. It is a common path, and the intention for the majority of people on an H-1B visa.
[1]: https://isss.temple.edu/faculty-staff-and-researchers/intern...