hello guys

is it a good idea to buy an electric guitar and plug it to my pc (via any device or something) to play via the laptop speakers?

or I definitely need amplifier's speaker?

any set up suggestion please?

It is a good idea. You will need an audio interface to connect your guitar to pc. Then you'll need an anp simulator on your pc. And you should also get some good speakers if you want a good sound (maybe you already have some, i dont know).
Anything with a good ASIO driver. And to make it easier, something with a DI on it. Line-6, Focusrite, RME, MOTU, tons of M-Audio Fastracks can be found cheap on craigslist or Ebay