Here are some possible routes are below.
Route 1.
1. Study in Portugal
2. Get job and experience in Portugal
3. Get H1B
4. Get Green Card
Route 2.
1. Play DV lottery every year
2. If you win, go through process and get visa, you get a GC after entry to the US
Route 3.
1. Get F1 to study in the US
2. See if you like US
3. Get OPT
4. Get H1B
For the route 3 though, you cannot plan on coming and staying in the US. This is only a hypothetical scenario, which gives you a chance to get education and work experience in the US.
You should also be aware that GC comes with responsibilities, such as (there's more than provided):
- Reporting income for tax purposes world wide, even if you moved out of the US.
- Selective service in US army for men between 18 and 26
- Living in the US on permanent basis. Trips overseas generally shouldn't exceed 6 months.