How to allow internet only to specific users while others need to access the local network?

There are almost 50 users in my office. I want to provide internet access only up to some specific systems (5-6 nos). Remaining systems need to be disconnected from the internet. But it must be interconnected by LAN and must have an internal communication application (through any intranet communication app). Server 2019 is there, but…