is it okay to key in the windows server 2019 to my windows server 2016?
What is meant? Use the product key? No this wouldn't work. A 2019 product key can only activate Server 2019.
An in-place upgrade? Not recommended for a variety of reasons, better to clean install it, patch fully and migrate roles or applications over to it.