I would like to know if some open source wallets like Electrum have their own servers to do that job or if they work with the public nodes of the bitcoin network.
I'm also interested to know if there are any hardware wallets that do that. If not, I would like to know if there is a way to check the balance of an address using the btc network and not a blockchain explorer, for example with some node calls running btc core.
Very good alternative for Electrum is called Sparrow Wallet.
This is open source wallet that respects your privacy and it can be connected easily with your own Bitcoin node.
There is detailed built-in transaction viewer, wallet has great support for hardware wallets and there is coinjoin mixing with Whirlpool.
One more way you can check balance of your address is to use open source mempool.space with your own Bitcoin node.
https://sparrowwallet.com/