Print in Flutter. Why just work inside build

I comment what I understood about this. Need someone give me a better explanation here. Thank you for your time.

class PrintScreen extends StatelessWidget {

  const PrintScreen({Key? key}) : super(key: key);

  /// 'print' must have a method body because 'PrintScreen' isn't abstract.

  /// Oh man, this is just a normal method, PrintScreen just a class

  /// So it does not understand 'print' here

  /// Stateless widget does not have method 'print' so

  /// we can not use it?

  // print('\n\n___ PrintScreen');


  Widget build(BuildContext context) {

    print('\n\n___ PrintScreen');