@sweeti-b You want to change the bass of a song that was already published on YouTube or do you want to remove the guitar and add yours? It's not very easy to change pre-recorded music. There are free online services that use a AI called Spleeter that can split a song into five stems (vocals, bass, drum, piano and rest). But the single stems are very likely going to sound like "underwater".
You could use one of these services and you'll get the vocals, bass, and drums and then edit the bass and you could add your guitar as a newly recorded track. It depends on the song how good this will work.
. . . . . can I record a song from youtube then edit just the bass then record me playing guitar . . . .
In practical terms - no - to add to @SP. comment a song published as MP3, FLAC or any other audio format does not have the instruments, vocals etc as distinct tracks/streams and the splitters have to try to separate out the components which can muffle the sound.
By analogy it is like being in a room full of people who are all talking at once and you are trying to listen to a single person who is not in close proximity to you - you only get bits of the conversation.
What do you intend to do with the audio track if you manage to get it split and have added your guitar playing?