NIF first: the document that unlocks everything
The NIF is a 9-digit Portuguese tax number issued by the Autoridade Tributária. Every Portuguese resident has one. Every non-resident who owns Portuguese property, holds a Portuguese bank account, or files a Portuguese tax return has one too. For British movers, the NIF is typically the first thing to obtain, before any other step of the relocation.
Two routes: in person at a Finanças office in Portugal (free, but obviously requires being in Portugal), or remotely via a fiscal representative (typically €50-€200 from one of dozens of Portuguese law firms offering the service). Remote NIF takes 2-4 weeks. Once obtained it is permanent and never changes.
After NIF is in hand, you can open a Portuguese bank account, secure a long-term rental, sign utility contracts, and progress your D7 or D8 visa application from the UK. Without NIF, none of those steps are possible.