Everyone has its own personal approach on this subject.
I will share my.
1) Find a good store near you - something like Guitar Center, Sweet Water or Kraft Music.
Those stores provide very decent returning policy (45-60 days).
Regardless of your chose order from them (whether they have it at your location or not).
You can buy online but in my experience every-time I buy at the store I get 15-20% discount which is normally not available online.
2) Selecting instrument. I consider only Kawai, Kurzweil, Yamaha, Korg, Casio, Roland.
2.1 Action - Look for 88 weighted keys with hammer action.
Yamaha entry level like P45 -115 declare they have hammer action however to me it feels more like a spring-action (not a hammer at all)
It is impossible without experience to make judgment about this subject.
Roland has a unique feature - "escapement" which can be experienced on acoustic piano ( actually it is a disadvantage of acoustic keyboards - less escapement better quality of the keyboard)
Kawai has 12 levels of velocity - I think it is the best overall.
Another big difference is a level of mechanical noise - Privia and CDP are noisiest keys from the list of brands above.
Roland is the most silent ( I do not know about Kawai and Kurzweil ).
3) Grand Piano sound - Privia is the champion in this category(for now) unless you are willing to spend $3000-4000+ for flagship models of any listed brands + Nord and Hammond.
At the reasonable price you will probably have to choose between silent keyboard(Roland) and best sound of grand piano(Privia).
If you decide to go with with Casio ignore CDP-130 start at least from PX 160. x60 line are the latest models.
On Roland side start from anything with weighted 88 hammer action keys.
Yamaha I cannot recommend but there are a lot of fans of it - start from P-115 .
Korg - entry level is Korg SP-280, Korg B1SP 88,Korg LP180 88
Kawai which makes great instruments - I like MP 7 ($1700) MP 11($2500)
Kawai makes a lot of different pianos of all kinds.
This can keep going forever
A couple of things I would like to add:
a. For lessons it can be critical to have USB-MIDI(and Direct-MIDI for integrating with other hardware).
b. If digital piano sold without triple pedal unit make sure that it can be extended with it later.