Blocking WAN while allowing LAN

Hello, is there a way to block a devices access to the internet while allowing it to have a LAN connection?

I have a VPN connection enabled on all devices for privacy, but at the same time I want to be able to block devices like printers & smart home products from accessing the internet while still being able to be accessed on the local network. Is this possible?

Thank you.