score:2
As I understand, both my visa-free 90 days for Ukrainians citizens and 90 days granted by polish student visa expired when I was waiting for the decision.
That may be, but since residence permit applications frequently require more time to process than the applicant has remaining, applicants who are awaiting an application are generally allowed to stay while the government processes it.
In any event, the 90 days are not typically counted very strictly for people with residence permits because their movements are not routinely tracked, so you really have nothing to worry about. But we can answer the question nonetheless. The Schengen Borders Code says, when talking about the 90-day rule:
Periods of stay authorised under a residence permit or a long-stay visa shall not be taken into account in the calculation of the duration of stay on the territory of the Member States.
Your 4-month period in Norway with a Norwegian residence permit is therefore the same as being outside the Schengen area for four months, for the purpose of the 90/180 calculation. Being outside the Schengen area for 90 full days completely resets the 90-day period, so the answer to your question,
Do I now have 90 days to use for travels outside Poland to other Schengen States?
is yes.