I think these days a masters in CS or a related field allows you up to 3 years of OPT. I.e multiple chances to apply for a H1B visa while working legally in the USA.
For more context: Currently theirs about 1 million f1 students in the USA and about ~500k h1b holders. Roughly 223k applied and got OPT in 2019. More figures can be found here:
https://www.cato.org/blog/facts-about-optional-practical-tra...