Order is important.
.NET 4.6 prerequisite installation fails for Microsoft Dynamics GP 2016 on Windows Server 2012 R2 – Microsoft Dynamics GP Community
Install, Upgrade & AdminDevelopment & IntegrationMicrosoft & the GP EcosystemGP 2016
Archived post from 2017. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.