Seemingly to make everything as complicated as possible and the Deutschland-Ticket unattractive, many vendors have strange and incomprehensible terms and conditions for the sale, one common oddity being that you have to cancel your subscription by the 10th of the calendar month the ticket is valid. If you buy a ticket for July, the subscription must be cancelled by the 10th of July, for the subscription not to be automatically extended for August as well. That is not necessarily a problem if you are able to plan a bit in advance, but makes it impossible to buy a ticket only for the rest of July, if you on the 11th of July or later decides that you could need the Deutschland-Ticket for the rest of the month. If you buy a ticket for the rest of the month on the 11th of July, you are already too late to cancel the subscription and must also pay for August anyway, even if you don't need the ticket.
The easiest way to solve this problem is simply to buy the Deutschland-Ticket from a vendor, which does not have the requirement that you have to cancel by the 10th. There are at least a few vendors with much simpler subscription conditions, I am not sure if I should point you directly to any of them, but mo.pla is often recommended. They allow you to cancel the subscription up until the second last day of the month (for July, that would be 30th of July) and have no further restrictions, which often make it difficult for tourists and visitors to Germany to buy and manage their tickets. Some other vendors even require that you have a German bank account to pay for the subscription. Note, that I am not affiliated with mo.pla and have never used their services.