How to get balance of specific token

Is there a way to get the balance of a specific token? (without running a while loop)

You can use web3 to do that, This is how we get WETH balance of specific wallet

const WETH9 = new web3.eth.Contract('abiWETH9', 'contractAddressWeth');

WETH9.methods.balanceOf('walletAddress').call({from: 'walletAddress'})
            .then((e) => {

Is it possible to do it with Web3 API?

it is possible to do it from your Moralis DB easier, for example you have BscTokenBalance table that automatically syncs that data for current authenticated users that use your application.