This seems super, but it is almost useless without knowledge about a size of a transaction.
Could someone please explain, how to calculate a fee more or less exactly to neither over- nor underpay?
For a less exactly option you can use the service of estimatefee (
https://estimatefee.com/).
Depending on the amount of inputs/outputs you will get an estimation of a required fee to get your TX confirmed within X blocks.
To calculate the size more accurately you need to know what kind of address you are spending from (Legacy / Segwit (and whether bech32 or P2WPKH, P2WPKH/P2SH)
and the amount of inputs / outputs your transaction is composed of. Afterwards you can use any service of your choice to look for an appropiate fee (e.g.
estimatefee or
https://bitcoinfees.earn.com/).
Usually most wallet providers let you to choose the fee in sat/B. Therefore you don't need to know the size of the TX to set an appropiate fee.
Just check the links out.